Template
Template copied to clipboard
Improving the Visualize attribute
Visualize cannot visualize Dictionaries in realtime
Steps to Reproduce
- Add following code
[Visualize(nameof(SomeDict))]
public partial class Node2D // position this node in the world somewhere where you will see it
{
public Dictionary<int, string> SomeDict { get; set; } = new();
// Update SomeDict somewhere in _Process or something
}
Side note that is unrelated to this issue: There is no way to tell visualize to position a visual panel that does not extend from Node2D or Control to a manual position while at the same time visualizing a member in realtime.
Visualize messages are not all colorized
There should be a public static util method(s) specifically made for handling visualize messages. As an added bonus this could be hooked into the thread safe logger class.
Visualize cannot see values of private members from inherited classes
Have a look at this commit 706e60d67584822daa54d49e14db6d198b27ab2f
Steps to Reproduce Issue:
- Set _curState access modifier from protected to private
- Remove [Visualize] attribute from EnemyComponent
- Run the game
- Notice how you cannot see _curState for EnemyComponents even though EntityComponent has the visualize attribute listening to the _curState field
- You will get the following message in console: "[Visualize] Tracking 'EntityComponent' to see if '_curState' value changes"
Where would one define settings for Visualize that can easily be edited by the developer?
For example I want to add a setting to disable visualization of underscores in private fields.