For example.my character stores 3 bullet classes that I want to spawn randomly when fired.is creating 3 different class variables ok?I see having a class variable in a blueprint will increase its size…
If you know you will spawn a bullet, it’s more than fine. Do not fixate on optimising something like this. But, do have a look at soft class references. Think of it as of a class that is in unloaded state, but can be loaded when needed.
If you had 300 classes, that’d could make sense.
Thanks.bullet is ok.but some other class is hundreds MB for a single one…so I’m thinking if I did it right.
Like now my tower stored a “next tower class“,that class is 500MB.should I make it a sort reference?
on a small ish game where everything is likely to be loaded anyway its not too important
but it is good practice and the reason its probably 500MB is because its dragging in other references, explosions, sounds etc so id say yes use soft references as long as you are comfortable with loading them
Greetings @baobao4435
I was going to put together a post of my own. But, the information @Everynone has supplied is fantastic! If you run into additional issues, I’d be happy to help. Also, thanks @Everynone! Great community!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.