MixedRealityToolkit-Unity icon indicating copy to clipboard operation
MixedRealityToolkit-Unity copied to clipboard

Mechanism to know when PrefabSpawnManager spawns a prefab

Open kyleWillson opened this issue 9 years ago • 2 comments

I need to run some local processing on Prefabs that get spawned. And I was wondering if there was some sort of mechanism (event Action) in place and I didn't see it, that can notify different scripts when a prefab was spawned. Something like in PrefabSpawnManager: public event Action<SyncSpawnedObject> ObjectSpawned; That gets fired when PrefabSpawnManager.Spawn() is about to return?

kyleWillson avatar Nov 02 '17 22:11 kyleWillson

It should all be self contained in the PrefabSpawnManger you write on your own. That class is just an example of how you could implement it.

StephenHodgson avatar Nov 02 '17 22:11 StephenHodgson

Ahhh gotchya. I just like using your guys' code since its got the support behind it (updates)

kyleWillson avatar Nov 02 '17 22:11 kyleWillson