Question by
ArmswieldTheHero · Oct 23, 2016 at 06:01 PM ·
scripting problemgameobjectinstantiatepun
How to getcomponent on an object instantiated through PUN
I'm currently trying to use
public scriptName gameobject
start()
{
gameobject = getcomponent<scriptName>();
}
on the child of an object instantiated with PUN. But whenever the game starts and the object is instantiated through PUN. The drag and drop reference is completely forgotten and if I drag it in manually through unity and resume, it works fine, but unfortunately We cant do this on the built game.
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612095300im_/https://answers.unity.com/themes/thub/images/avi.jpg)