Vixen
02b45cc4
csharp
public readonly record struct NetworkSceneId

A scene, as the wire names it.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Not a SceneHandle. A handle is a number a SceneManager hands out in load order, so the same level is scene 2 on a server that loaded the lobby first and scene 1 on a client that did not. The two have to agree on which scene an object is in, and the thing they already agree on is what the scene is called.

So this is the hash of the scene's name, computed the same way the prefab id is computed from an address and for the same reason: it is a pure function of authored content, so neither end has to be told it.

Fields and properties (4)

  • public uint Value

    The hash. Zero is None.

  • public static NetworkSceneId None

    No scene — an object that belongs to the session rather than to a level.

  • public bool IsValid

    Whether this names a scene.

  • public const int MaxBakedObjects

    How many networked objects one scene may have placed in it.

Methods (4)

  • public NetworkSceneId(uint Value)

    A scene, as the wire names it.

  • public static NetworkSceneId From(string name)

    The id a scene name hashes to.

  • public NetworkId BakedId(int index)

    The id a scene-placed object gets, without anybody allocating it one.

  • public override string ToString()

    Returns the fully qualified type name of this instance.

Used by (3)

  • NetworkSceneMapVixen.Net.Engine
  • NetworkSpawnTestsVixen.Net.Engine.Tests
  • NetworkSpawnerVixen.Net.Engine