Skip to content

Commit 3b0c29d

Browse files
authored
refactor: rename spawn/destroy register/unregister methods (#551)
1 parent 59ce805 commit 3b0c29d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

com.unity.multiplayer.mlapi/Runtime/Spawning/NetworkSpawnManager.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public static void RegisterSpawnHandler(ulong prefabHash, SpawnHandlerDelegate h
7070
/// </summary>
7171
/// <param name="prefabHash">The prefab hash to destroy</param>
7272
/// <param name="handler">The delegate handler</param>
73-
public static void RegisterCustomDestroyHandler(ulong prefabHash, DestroyHandlerDelegate handler)
73+
public static void RegisterDestroyHandler(ulong prefabHash, DestroyHandlerDelegate handler)
7474
{
7575
if (CustomDestroyHandlers.ContainsKey(prefabHash))
7676
{
@@ -83,19 +83,19 @@ public static void RegisterCustomDestroyHandler(ulong prefabHash, DestroyHandler
8383
}
8484

8585
/// <summary>
86-
/// Removes the custom spawn handler for a specific prefab hash
86+
/// Unregisters the custom spawn handler for a specific prefab hash
8787
/// </summary>
8888
/// <param name="prefabHash">The prefab hash of the prefab spawn handler that is to be removed</param>
89-
public static void RemoveCustomSpawnHandler(ulong prefabHash)
89+
public static void UnregisterSpawnHandler(ulong prefabHash)
9090
{
9191
CustomSpawnHandlers.Remove(prefabHash);
9292
}
9393

9494
/// <summary>
95-
/// Removes the custom destroy handler for a specific prefab hash
95+
/// Unregisters the custom destroy handler for a specific prefab hash
9696
/// </summary>
9797
/// <param name="prefabHash">The prefab hash of the prefab destroy handler that is to be removed</param>
98-
public static void RemoveCustomDestroyHandler(ulong prefabHash)
98+
public static void UnregisterDestroyHandler(ulong prefabHash)
9999
{
100100
CustomDestroyHandlers.Remove(prefabHash);
101101
}
@@ -743,4 +743,4 @@ internal static void OnDestroyObject(ulong networkId, bool destroyGameObject)
743743
}
744744
}
745745
}
746-
}
746+
}

0 commit comments

Comments
 (0)