Skip to content

Add a configuration warning system for ResourcesΒ #9098

@derkork

Description

@derkork

Describe the project you are working on

This is not game specific, it would be universally useful across projects.

Describe the problem or limitation you are having in your project

When you are working with resources, there are possibilities to misconfigure these resources, similar to how one can misconfigure a node. To solve this problem, nodes have the _get_configuration_warnings function which you can implement yourself to notify the user about misconfiguration. Resources have no such facility and as such, misconfigurations of resources will go unnoticed until the game is run.

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

It would be helpful if resources also got a _get_configuration_warnings function similar to how nodes do. Like with nodes these would require the scrip to be @tool and there is also an update_configuration_warning function to trigger an update.

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

The system would work pretty much identical to how nodes are used. However since resources can be used in various places, the warnings would need to be displayed in the inspector, for example somewhere on top of the properties like this:
2024-02-15_17-59-26

This way the warnings could also be shown when a resource is embedded inside of node property or another resource.

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

It would be used quite often, I think and right now one would need some custom inspector plugin for every resource that should participate in this system.

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

If checking of configuration errors in nodes is core, I think checking for them in resources should also be core.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions