-
Notifications
You must be signed in to change notification settings - Fork 130
Idea: Warning developer of invalid component state #515
Description
Example situation: the local_to_parent component fails to perform its function when certain conditions are not met. (Hierarchy must be set up correctly, parent must have local_to_world component.)
Currently, there is no feedback to the developer about this.
As one suggestion, we could work towards something like what Godot has, which I'll show below:
In figure 1, CharacterBody2D_a is set up correctly, while CharacterBody2D_b is not.
Clicking on the small /!\ icon displays a popup:
Figure 2 shows the popup message: it indicates what's causing the problem, what the consequences of the problem are, and suggests a way to fix it. If the developer runs the program anyway, there are no further error messages or warnings.
We don't currently have a graphical UI for editing nodes, so my initial proposal is this:
-
Some kind of common system for each component to detect and report any invalid state which causes it not to function (e.g. a
local_to_parentchild that is missing a parent, or its parent does not have thelocal_to_worldcomponent) -
When running in non-debugger mode, print this warning to console and suggest the game be run in
--debuggermode to examine these errors/warnings better. -
In
--debuggermode, show something similar to the Godot /!\ icon next to every component that is reporting invalid state.
Related to #480

