- Home /
Why do game objects that have been instantiated during runtime act differently than ones that have been placed in the editor
I have this game called yellowsquare which has blasters that you can pick up and use. When I place them in the editor before I hit play it works fine, but when I place them after i hit play, they act like the firepoint is below (0,0). I'm not an experienced programmer, but there isn't anything in the start methods so I think it may be unity. I'm not asking for a fix to my problem though, I just want to know if there's anything diffrent about these methods of instantiating.
The firepoint does that for lasers so its not the bullets.
p.s thanks for reading this far.
Answer by Monsoonexe · May 21, 2021 at 05:50 PM
Something to note is that if a Component is created in the Editor and its GameObject is inactive (disabled), then that Component's Awake() and Start() methods will not be called immediately. Rather, they are called the first frame that the GameObject is active. Typically, a GameObject created at runtime will be created in an enabled state, so its Components' Start() and Awake() will be called immediately.
Not sure if this is your problem, but something to consider. Are there any more details you can give to narrow down the issue?