Skip to content
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

Add a Default Canvas Cull Mask project setting #11122

Open
Summersay415 opened this issue Nov 9, 2024 · 2 comments · May be fixed by godotengine/godot#98989
Open

Add a Default Canvas Cull Mask project setting #11122

Summersay415 opened this issue Nov 9, 2024 · 2 comments · May be fixed by godotengine/godot#98989

Comments

@Summersay415
Copy link

Summersay415 commented Nov 9, 2024

Describe the project you are working on

2D Shooter game with minimap which uses SubViewport and visibility_layers

Describe the problem or limitation you are having in your project

Minimap works this way: all its elements are on visibility layer 2, and everything else by default is on layer 1. I have MinimapViewport which have canvas_cull_mask set to 2. And I need to hide all CanvasItems with layer 2 on the root Viewport. To do this, I can write some initialization code, like get_tree().root.set_canvas_cull_mask_bit(2, false), from editor interface I can't do this.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Add project setting rendering/viewport/default_canvas_cull_mask which sets canvas_cull_mask on root Viewport on startup, providing more friendly interface than editing in code.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Just single project setting rendering/viewport/default_canvas_cull_mask, which sets canvas_cull_mask on root Viewport on startup, but only in Game, not the Editor (I want to see all CanvasItems in the editor regardless of this setting)

If this enhancement will not be used often, can it be worked around with a few lines of script?

It can be worked around, but we have so much settings which just set something on root Viewport on startup, so, why not?

Is there a reason why this should be core and not an add-on in the asset library?

It's core

@clayjohn
Copy link
Member

clayjohn commented Nov 9, 2024

Could you describe the limitation you are having in your project and how this new feature would lift that limitation?

The most important part of a feature proposal is communicating how this feature is needed to unblock you. It's not enough to say that you simply want the feature and the limitation is lifted by having the feature.

@Calinou Calinou changed the title Implement default_canvas_cull_mask Add a Default Canvas Cull Mask project setting Nov 9, 2024
@Summersay415
Copy link
Author

Updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants