Greetings Go Dots.
I'm running Godot 3.1.1 and I have 32Gigs of RAM
So here's my scenario:
I start with a basic 2D menu as the Main Scene ("res://TitleScreen.tscn") - at this point, my mem usage is 45MB
I pick play from the menu and the script calls level01 as follows:
gettree().changescene("res://levelScenes/Level01.tscn")
Level 1 of my 3D game loads up fine, now I'm up to 156MB of memory.
I press "esc" which loads an in-game menu
var pausemenu = preload("res://PauseMenu.tscn")
var s = pausemenu.instance()
addchild(s)
gettree().paused = true
I'm still at 156MB of memory usage. The menu is set to "process" during 'pause'. I can pause and un-pause, that works fine, no changes to memory.
To UNpause I use:
gettree().paused = false
self.queuefree()
The above dumps the part of the tree that holds the menu, again no changes to memory using this pause and un-pause.
Next I choose the menu option to get back to the main menu which runs this:
gettree().changescene("res://TitleScreen.tscn")
Memory usage climbs to 172MB, where in the beginning this scene only used 45MB. So I'll choose to run Level 1 again by choosing the exact same 'play' option that ran it perfectly last time:
gettree().changescene("res://levelScenes/Level01.tscn")
At this point the scene tries to load but none of the 3d assets appear this time. I can't bring up my menu, and it shows me an empty 3D viewport.
I am stumped. Help?