[ad_1]
I’m utilizing Unity Visual Scripting, and primarily utilizing 3 major sorts of variables:
- Graph Variables – Graph variables are native to an occasion of a script graph. They have the smallest scope and can’t be accessed or modified exterior their graph.
- Object Variables – Object variables belong to a recreation object. They are shared throughout all graphs on that recreation object.
- Scene Variables – Scene variables are shared throughout the present scene.
One factor I’ve seen is that over time, my Object Variables are filling up with a lot of variables which might be basically short-term in nature. This clutters up my Inspector, and makes it more durable to seek out the crucial variables I would like for debugging.
For instance, I carry out detailed calculations for every Object to find out precisely the place sure shadows ought to seem. I need to hold the outcomes of those calculations as an Object variable, however need not hold the entire intermediate variables that I used within the calculation. These intermediate variables simply clog up my Inspector.
Is there a strategy to delete unneeded variables after I now not want them? Or a strategy to designate sure variables as short-term in nature?
[ad_2]