-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VisibilityNotifier2D - very high memory usage #40577
Comments
Out of curiosity, can you reproduce this with VisibilityNotifier (3D)? |
@Calinou just tried -> NO! ... VisibilityNotifier (3D) is simply staying on almost no memory usage. |
This is probably caused by too small cell size. |
@qarmin Thank you, will test it. Do you know if cell_size is based on pixels? (i.e. 100 = 100x100 pixel?) What is the downside of increasing this setting? And why is this setting in the project settings and not directly added as property in the VisibilityNotifier2D? If the description is correct, it's only affecting the node VisibilityNotifier2D. Rather confusing for the user. |
Update: I can confirm, that the memory usage with increased "cell_size" in the project settings is getting better. Also it's worth noting, that the cell_size is in PIXELs, for others looking up this issue! For my project I set the cell_size to the full grid (Rect2), so the memory cost is almost non existant ... as all my Visibilty Notifier are having the same size, this is working also based on the global setting and the lost precision is not noticable. Question: |
See #40577 (comment). (cherry picked from commit f83249f)
See godotengine#40577 (comment). (cherry picked from commit f83249f)
Godot version:
OS/device including version:
Issue description:
Size of VisibilityNotifier2D Rect2 is exponentially increasing the required memory (static)!
This is true if you increase Rect2 size either within editor or via code.
Example:
This example is extrem, but it shows the issue.
In my case I needed > 100 notifiers and even on small Rect2 sizes it scaled the memory effect very fast.
Steps to reproduce:
Add a VisibilityNotifier2D and increase Rect2 in editor or use below code.
Minimal reproduction project:
Just add following code to a new 2D Scene:
The text was updated successfully, but these errors were encountered: