userBill Bcancel
branchwiseguys/main/BuildingDefLazyInstantiationcancel

4 Commits over 0 Days - ∞cph!

6 Years Ago
Don't need these in OnDesroy, + causes errors with it there
6 Years Ago
Moving Destroyed things out of the heirarchy immediately. Prevents them getting into the final project buildings when they shouldn't
6 Years Ago
Revert building manager change as there were bugs, since loading building definitions needed to wait a frame to work properly. Started a branch to maybe look into it.
6 Years Ago
Just starting a branch where I might check out the bugs with loading building definitions as needed. Problem is the building definition, when it loads, often creates stuff that it then later decides to call Destroy on. But Destroy takes one frame. So if you load definitions as needed instead of on startup, the extra stuff is still there when the actual building is spawned and you get extra meshes like bonus floors. Need to either delay things somehow, or make sure all the destroys also set the parent to null to kick stuff out of the heirarchy, or set some sort of invalidating flag.