Skip to content

Commit

Permalink
feat: adding ClearSceneId function
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Frowen authored Dec 6, 2024
1 parent a849c1b commit a492705
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Assets/Mirage/Runtime/NetworkIdentity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,14 @@ public sealed class NetworkIdentity : MonoBehaviour
/// <returns></returns>
public bool IsSceneObject => _sceneId != 0;

/// <summary>
/// Used to clear <see cref="SceneId"/>. Use in cases where you want to spawn object in custom way using Spawn Handlers with AssetId.
/// </summary>
public void ClearSceneId()
{
_sceneId = 0;
}

/// <summary>
/// Is this object a prefab and have a <see cref="PrefabHash"/> so that it can be spawned over the network
/// </summary>
Expand Down

0 comments on commit a492705

Please sign in to comment.