From a67fd9084bd862fe9f9ac4377420b8c43c47938c Mon Sep 17 00:00:00 2001 From: vis2k Date: Thu, 25 Feb 2021 15:10:27 +0800 Subject: [PATCH] RegisterPrefab with assetId: add comment --- Assets/Mirror/Runtime/ClientScene.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Assets/Mirror/Runtime/ClientScene.cs b/Assets/Mirror/Runtime/ClientScene.cs index 84e65c5c4..aaed283c3 100644 --- a/Assets/Mirror/Runtime/ClientScene.cs +++ b/Assets/Mirror/Runtime/ClientScene.cs @@ -350,6 +350,8 @@ public static void RegisterPrefab(GameObject prefab) /// An assetId to be assigned to this GameObject. This allows a dynamically created game object to be registered for an already known asset Id. /// A method to use as a custom spawnhandler on clients. /// A method to use as a custom un-spawnhandler on clients. + // NOTE: registering with assetId is useful for assetbundles etc. a lot + // of people use this. public static void RegisterPrefab(GameObject prefab, Guid newAssetId, SpawnDelegate spawnHandler, UnSpawnDelegate unspawnHandler) { // We need this check here because we don't want a null handler in the lambda expression below