Buddy
Buddy
CC#
Created by Yuji on 3/7/2025 in #help
✅ Memory leak or What?
Then you can see what is taking up memory
114 replies
CC#
Created by Yuji on 3/7/2025 in #help
✅ Memory leak or What?
No description
114 replies
CC#
Created by Yuji on 3/7/2025 in #help
✅ Memory leak or What?
Take a snapshot
114 replies
CC#
Created by Yuji on 3/7/2025 in #help
✅ Memory leak or What?
If you can afford to dump some money into it, https://www.jetbrains.com/dotmemory/ is an amazing tool to find possible memory leaks
114 replies
CC#
Created by ShowTime13 on 3/6/2025 in #help
Is the check if variable is certain value creating performance hit?
78 replies
CC#
Created by ShowTime13 on 3/6/2025 in #help
Is the check if variable is certain value creating performance hit?
There is something called branchless programming but it's often not worth it
78 replies
CC#
Created by ShowTime13 on 3/6/2025 in #help
Is the check if variable is certain value creating performance hit?
And on the implementation
78 replies
CC#
Created by ShowTime13 on 3/6/2025 in #help
Is the check if variable is certain value creating performance hit?
Depends on the use-case
78 replies
CC#
Created by ShowTime13 on 3/6/2025 in #help
Is the check if variable is certain value creating performance hit?
An action still has to be made somehow, so if you want something to happen immediately, then you can skip using the update-loop; if you want to do something over-time then you need some kind of loop (Update-loop, etc)
78 replies
CC#
Created by ShowTime13 on 3/6/2025 in #help
Is the check if variable is certain value creating performance hit?
If you want it to be instant then you do not need the check in the loop, no.
78 replies
CC#
Created by ShowTime13 on 3/6/2025 in #help
Is the check if variable is certain value creating performance hit?
You can't really avoid that because you want to slow down over-time, correct?
78 replies
CC#
Created by ShowTime13 on 3/6/2025 in #help
Is the check if variable is certain value creating performance hit?
It is called at a fixed interval, mostly used for physics.
78 replies
CC#
Created by ShowTime13 on 3/6/2025 in #help
Is the check if variable is certain value creating performance hit?
That's why you have FixedUpdate
78 replies
CC#
Created by ShowTime13 on 3/6/2025 in #help
Is the check if variable is certain value creating performance hit?
In the update-loop its not actually 60 times per second, but each frame. Depending on your settings it can even be 500 times per second.
78 replies
CC#
Created by ShowTime13 on 3/6/2025 in #help
Is the check if variable is certain value creating performance hit?
Are you making a game or are you focusing your time optimizing your code? Make game first, optimize after you've finished the MVP
78 replies
CC#
Created by ShowTime13 on 3/6/2025 in #help
Is the check if variable is certain value creating performance hit?
If you are worried about performance, do as I said. Use the profiler. If you see no significant % then don't bother.
78 replies
CC#
Created by ShowTime13 on 3/6/2025 in #help
Is the check if variable is certain value creating performance hit?
Have performance in mind but dont go out of your way to optimize everything just because it is marginally faster. Start optimize whenever you hit a bump.
78 replies
CC#
Created by ShowTime13 on 3/6/2025 in #help
Is the check if variable is certain value creating performance hit?
Start worry about performance if you for example call GetComponent<T> in an Update-loop
78 replies
CC#
Created by ShowTime13 on 3/6/2025 in #help
Is the check if variable is certain value creating performance hit?
But either way, checking a boolean is faster but it has no significant impact. So code whatever is easier to read AND is less complicated.
78 replies
CC#
Created by ShowTime13 on 3/6/2025 in #help
Is the check if variable is certain value creating performance hit?
If you worry about performance then you shouldnt use monobehavior at all but use DOTS + Burst.
78 replies