Skip to content

OnWorldPrefabSpawned

Usage

  • No return behavior

Example Autogenerated

csharp
private void OnWorldPrefabSpawned( UnityEngine.GameObject gameObject, string category )
{
    Puts( "OnWorldPrefabSpawned works!" );
}

Location

  • World::SpawnPrefab(string category, Prefab prefab, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation, UnityEngine.Vector3 scale)
csharp
//---
			prefab.ApplyTerrainPlacements(position, rotation, scale);
			prefab.ApplyTerrainModifiers(position, rotation, scale);
		}
		GameObject gameObject = prefab.Spawn(position, rotation, scale);
		TrackSpawnedPrefab(category, gameObject);
		Interface.CallHook("OnWorldPrefabSpawned", gameObject, category);
		spawnTimer.Stop();
		spawnTimings.Add(new SpawnTiming
		{
			category = category,
			prefab = prefab,
//---

Released under the MIT License.