OnWorldPrefabSpawned
Usage
- No return behavior
Example Autogenerated
csharp
private void OnWorldPrefabSpawned( 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.ApplyTerrainModifiers(position, rotation, scale);
}
GameObject gameObject = prefab.Spawn(position, rotation, scale, true);
if (gameObject)
{
Interface.CallHook("OnWorldPrefabSpawned", gameObject, category);
gameObject.SetHierarchyGroup(category, true, false);
}
World.spawnTimer.Stop();
World.spawnTimings.Add(new World.SpawnTiming
{
//---