Add an easy way to modify the values set in [Export] variables from script #5318
Replies: 1 comment
-
In your example, you have an array of And if you were to implement an addon or even a core feature to search for these, how would you tell apart innocent Instead, you should use Now if that does not work, I suppose you would need a custom addon, one that you can configure to only check the properties you want it to (It could search the scenes for But before you go on making a custom addon. Consider some alternatives: First of all, good all Similarly, consider making the script of your custom Anyway, all these approaches do not cover the case where you forgot to include a particular enemy. Thus, how about this: make a I'll remind you that you can check |
Beta Was this translation helpful? Give feedback.
-
I have the variable
[Export] public string[] Entities;
. I set the values from the Godot editor. For this particular scenario, they are enemies I'm using to activate when a player enters a specific Area2D. Sometimes while I'm designing the level I'll remove the enemy from the level but I will also have to manually remove it from this [Export] variable I have set. Even though there is aGetNodeOrNull()
function being used so there are no errors being thrown, it would be nice to have a way in the script to search for which nodes are null when pressing a button from the editor inspector or when the game runs. This way no unneeded checks are done when the actual game is shipped for people to play just because I forgot to update some [Export] values. This is not a big deal and I can live without the feature, it would just be a nice to have.Beta Was this translation helpful? Give feedback.
All reactions