- Home /
Question by
sheffieldlad · Jan 12, 2014 at 01:23 AM ·
editorparticle emitternetwork instantiategame objects
How do I assign a game object to a slot in the inspector at runtime?
Hi.
I'm instantiating a player prefab on network connect which has several particle emitters attached to it.
One of my scripts (attached to another object) needs to know about the emitters so it can control them. I don't want the player prefab in the scene at the start of the game.
My question is, how do I make my emitters known to my other script on network connect?
I've tried dragging them from the assets folder into the inspector before the game starts but they fail to be controlled by the script.
If I start my game and then drag them from the hierarchy into the slots in the inspector after the prefab has been instantiated they work fine.
How do I make my script aware of my newly instantiated particle emitters?
Many thanks.
Comment