Hello, sorry for the wait between devlogs! I’m going to try to push out one every few days from now on if I can manage it. Without further ado, let’s get into it!
So as you may or may not know, Vortrus is my first real game and as such I’ve made a lot of “rookie” mistakes while developing it. Many of these were simple fixes, and frankly this is no exception. For example, during early development, I was changing the alpha of my UI to 0 in order to “hide” pause menus and such. This was obviously ineffective (very much so! I could just turn the gameobject off…). Even THAT, however, is trumped by my latest mistake: instead of simply using the loading function again on the scene to reset everything, I simply wrote a function to reset EVERY single gameobject.
This is obviously feasible… I simply put a destroy function on every script of every object that destroyed it when a certain static variable was triggered. But obviously, this added a lot of overhead.
The Solution
The solution to this dilemma was simple: I simply reloaded the scene. This cut down significantly on overhead. It is simple, elegant, and I CANNOT believe I overlooked this simple mistake. Oh well, it won’t be sneaking into any future projects, that’s for sure.
Keep posted and make sure to follow Vortrus to get updates! As always, thank you to my followers!
0 comments