Skip to main content

ServerScene

[CreateAssetMenu(fileName = "NewServerScene", menuName = "m00m/Networking/ServerScene")]
public class ServerScene : ScriptableObject
{
public string SceneName;
public string ServerNamePrefix;
public string Destination;
public Vector3 SpawnPosition;
public Quaternion SpawnRotation;
public Vector3 FirstTimeSpawnPosition;
public Quaternion FirstTimeSpawnRotation;
public AssetReference SceneAddressable;
public string addressablePath;
public string serverMatchmakingQueue;
public PlayerArea defaultArea;
public int MaxPlayers = 20;
public bool isGameMode = false;

public List<GameCapability> GameCapabilities = new();

public GameMode ClientGameMode;

public float respawnHeight = -100f;

public List<PlayerEquipment_SO> BannedEquipment = new();

public PlayerCamera CameraPrefab;
}

This ScriptableObject defines a destination for a client connection inside of m00m world.

Properties include:

  • SceneName: The name of the scene.
  • ServerNamePrefix: A prefix for the server name, used to delineate rooms.
  • Destination: Label displayed to the user
  • SpawnPosition: The position where players spawn when they enter the scene.
  • SpawnRotation: The rotation of the player when they spawn.
  • FirstTimeSpawnPosition: The position where players spawn when they first-ever enter the scene.
  • FirstTimeSpawnRotation: The rotation of the player when they first-ever enter the scene.
  • SceneAddressable: An addressable asset reference to the scene.
  • addressablePath: The path to the addressable scene asset.
  • serverMatchmakingQueue: The matchmaking queue for the server, used for Matchmaker Queue.
  • defaultArea: The default player area for the scene, used to subgroup chat rooms. Semi-defunct
  • MaxPlayers: The maximum number of players allowed in the scene before a new instance should spin up
  • isGameMode: Whether this scene is a minigame mode, such as tag or soccer, or not. If true, the scene will be treated as a game mode and will have different behavior.
  • GameCapabilities: A list of game capabilities that the scene supports, with attributed permissions.
  • ClientGameMode: The game mode that the client will use when entering the scene.
  • respawnHeight: The height at which players will respawn if they fall below this height.
  • BannedEquipment: A list of equipment that is banned in this scene, such as hoverboards or other items.
  • CameraPrefab: The prefab for the user's camera that will be used in the scene, allowing for custom camera behavior.