RegisterPrefab with assetId: add comment

This commit is contained in:
vis2k 2021-02-25 15:10:27 +08:00
parent 8854844a7f
commit a67fd9084b

View File

@ -350,6 +350,8 @@ public static void RegisterPrefab(GameObject prefab)
/// <param name="newAssetId">An assetId to be assigned to this GameObject. This allows a dynamically created game object to be registered for an already known asset Id.</param> /// <param name="newAssetId">An assetId to be assigned to this GameObject. This allows a dynamically created game object to be registered for an already known asset Id.</param>
/// <param name="spawnHandler">A method to use as a custom spawnhandler on clients.</param> /// <param name="spawnHandler">A method to use as a custom spawnhandler on clients.</param>
/// <param name="unspawnHandler">A method to use as a custom un-spawnhandler on clients.</param> /// <param name="unspawnHandler">A method to use as a custom un-spawnhandler on clients.</param>
// 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) 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 // We need this check here because we don't want a null handler in the lambda expression below