As your last remark there swerves closer to the techniques available for controlling what goes into your build…
Let me suggest also partial scenes additively loaded as being awesome tools. You can load partial scenes that contain anything, and all that goes in the build as long as that scene is part of the build, no muss, no fuss.
And with that I shall leave you with links to some more of my mad ravings about partial scene additive loading.
Additive scenes are one possible solution:
I always favor breaking the scenes up and loading additively.
reduces overall memory consumption
lets multiple team members trample on each other less often
ensures clean “reset” of all objects in a fresh loaded scene
I’m working on a game now where we each have our own “content” level, the level we’re working on.
the content scene has all the lighting baked in.
Just press play and that level has one script that additively loads:
music scene (just an audiosource on autoplay)
the …
Glad you asked… going this route definitely requires slightly-higher awareness of what scene is what.
In no particular order, responding to you questions,
When the game or level is over, I try to go to a fresh “end level” scene (not additively!) and clear everything else out (except overall ongoing game manager obviously, as a singleton)
when the game gets paused I stop time and bring up a pause scene that sorts above all else, then unload it and restart the time. OR if you quit, I just …
There are underlying reasons this happened and you can track it down by examining everything about each scene’s canvas setup and scaling that are different from the other.
But keep in mind it might not be super-easily to address it in the general case, especially if you start partitioning your UI into chunks.
An alternate workflow is to put chunks of your UI into separate scenes and then load those scenes additively.
For instance you might have the following scenes, all loaded additively:
c…
A multi-scene loader thingy:
Other notes on additive scene loading:
Why not remove the player from ALL your scenes, put him in his own separate scene, then load scenes additively?
That way you don’t even need a Player prefab at all, just have a Player scene and load him additively.
I tend to break up all my games into partial scenes, all additively loaded by the game manager:
UI
player
enemy manager
other stuff?
and then finally I load the content scene.
The first batch of screens all have scripts that do nothing until the content scene appears and they kn…
Timing of scene loading:
If line 8 relies on something being present from the scene load in line 7 (in GameController), it won’t be: scenes are loaded at the end of frame and would never be available until the next frame, at the very earliest.
You can trivially make void Start() into a coroutine by declaring it to return an IEnumerator, then put a while loop (with a yield return null; in it!!!) to wait until the scene loads and you find the “Trains” object, then proceed.
Obviously you would need to interlock other thi…
1 Like