BulletDecalGeneric + Dynamic Scenes loading

SirRingo

Member
hey guys - maybe someone tried this before.

so my scene is dynamically loading other "sub" scenes with the environments, for optimizing memory reasons.
and it seams that the BulletDecalGeneric1,2,3,4 that are beeing spawned on each shot are having issues with that.
in fact - even the 2 "sub" scenes which are being load on start are having problems.
the BulletDecalGenerics wont apear on those "sub" scenes -
 
It may help to know a little more on exactly how your sub-scenes are set up to load etc.

However to start debugging this, you can start by stepping through the SpawnDecal method in DecalManager.cs and see if the decal is being destroyed at lines 149 or 156. For example, perhaps your sub-scene setup is disabling/removing renderers which is causing the DecalManager to destroy the decal.
 
thanks Andrew - that sounds like the right way to go.
basically I am simply calling them by:

SceneManager.LoadScene(sceneName, LoadSceneMode.Additive);

maybe the Additive Mode is destroying the decal ?
 
Possibly - can you try logging in DecalManager.cs at the lines I suggested to see if the decal is being destroyed at these points? If not, you can use the OnDestroy method on the decal prefabs to figure out if/when they are getting destroyed.
 
ANDREW - thanks a lot. I wrote it all down, and will be getting in to this later on with the help of a better programer than me (hopefully :ROFLMAO:).
for now, because this is a POC for PC, loading a one bigger scene, insted of all the sub scenes dinamic load --> dosent seem to have a masive impact.

so - I will be pusing optimisation for later, as allways. hope it wont come back to byte me the ---?---later on.

thanks alot. I will update everyone once we will get to the botom of this
 
Top