- Home /
Statics variables in structs for jobs system
So i have a IJob struct which has some variables which are going to be static throughout the game but each time i create a new instance of the struct, I have to assign all those variables there cause structs can't have any assignment as of what I understood. And it makes the performance even worse cause as of now m not using the burst compiler, is there a solution to this? Would be a pleasure to have one.
(...) assign all those variables there cause structs can't have any assignment as of what I understood (...)
Usual field assignment operation is so fast that it won't even register in Profiler window. You probably meant something different but I can't know because there is no code to look at.
Your answer
Follow this Question
Related Questions
How can recreate entitymanager after recompile (Unity ECS or DOTS) 0 Answers
Why is my job running slowly the first few frames then speeding up? 1 Answer
Are C# Global Variables Safe In Unity? 5 Answers
Help needed for begginer. With scripting items. 1 Answer
I'm unable to clear a variable that is used in multiple scripts. 0 Answers