When I initially load my game, certain scripts do not load. As a matter of fact, they don’t load the game objects at all. I can’t seem to find the root cause of this, but I assume a script error is why it is happening. I don’t get any distinct errors, and I can pause/unpause the game and it fixes all the game objects not loading in. So they are there, just not displayed. Can someone tell me why this is happening? I can provide the scripts the time objects it is happening to if needed. Thanks!
This description is not enough to work off of.
Can you scale the problem down, recreate it in a simple scene of just a couple objects/scripts?
I’ll be more specific. When I load into the game, the FPSController loads only so that I can move and trigger other objects. My flashlight light spawns, but the 3d model for the flashlight doesn’t spawn. I also am shorter, physically. When I pause the game and unpause (via a pause script) Everything fixes itself. I get taller (to the proper height) and the flashlight model spawns in.
Do you have animations/tweens/routines that change the size of your character?
Do you have scripts that spawn prefabs, rather than have them in the scene from the get go?
And, again,
Can you scale the problem down, recreate it in a simple scene of just a couple objects/scripts?
I ask because, 1) scaling the problem down to just the problem spots helps find them easier. And 2) if someone were to want to check your source for the problem, they probably don’t want to download some massive project, and rather just the problem spots.
After some testing the problem turned out to be:
I placed 2 cameras on my FPSController, one which controlled motionblur, and one that didn’t, which caused the conflict. Thanks for the recommendations though. I should organize my projects better