SceneLoader question
by Will O-Reagan · in Torque X 2D · 06/29/2007 (11:44 pm) · 4 replies
When I unload a scene, is it supposed to unload everything that that particular scene added, or is it supposed to unload all the scenes.
About the author
I have a degree in dramatic art, and literature, from UC Santa Barbara. I've worked for a few studios, also at Animax Ent in 2008, and some smaller studios. Currently studying Computer Science at CSU Channel Islands.
#2
06/30/2007 (2:30 am)
It just unloads everything in the file specified in my experience.
#3
edit:
A simple test revealed that if you if you unload the first scene you loaded, all scenes are unloaded. If you unload the second scene, your first scene will not be unloaded...
example
Begin Game()
LoadScene A
Load Scene B
UnloadMethod()
UnloadSceneA
//Scene B is automatically unloaded
VS
Begin Game()
LoadScene A
Load Scene B
UnloadMethod()
UnloadSceneB
//Scene A Remains intact
edit: I should add that this does not hold true while testing my larger game. I loaded before all other scenes a dummy first scene, hoping that my other scenes would then remain in tact over multiple unloads of other scenes, and this was not the case.
06/30/2007 (9:16 am)
@Josh, Thats how it was working for me too. But it didn't seem to work yesterday, so I wanted to get some more opinions on what I should be looking for..edit:
A simple test revealed that if you if you unload the first scene you loaded, all scenes are unloaded. If you unload the second scene, your first scene will not be unloaded...
example
Begin Game()
LoadScene A
Load Scene B
UnloadMethod()
UnloadSceneA
//Scene B is automatically unloaded
VS
Begin Game()
LoadScene A
Load Scene B
UnloadMethod()
UnloadSceneB
//Scene A Remains intact
edit: I should add that this does not hold true while testing my larger game. I loaded before all other scenes a dummy first scene, hoping that my other scenes would then remain in tact over multiple unloads of other scenes, and this was not the case.
#4
06/30/2007 (12:28 pm)
Is this the way the engine was supposed to work, or can we confirm that this is a bug?
Torque Owner Luke Larson