hello,
if i use @export var for a value to be saved in the inspector
that var will show on the inspector, i already have a menu to deal with this ( var )

Is there a way to make it so the ( var ) gets saved but it doesnt show in the inspector for editing ?
Has i mention theres already a menu dealing with this var it just doesnt get saved... If the user switches between nodes or scenes the ( var ) will return to its default value.

chat GTP told me i should use "@internal var" instead of "@export var"
but it doesnt work... and i cant find anything on google or forum about it...

godot4 error: Unreconized annotation: "@internal".

    jonSS how about you dont export var? var chazner = "Chad"
    Chat jeepity is dumb when it come to godot. its python based and biased.. its heavily censored and anti democracy..

      kuligs2 Ho man i wish i could do that...
      but, iam using tool, its a plugIN... all the vars get reseted to their default values "Chad"...

      that means that if you click on another node or exit the current scene.
      "John", "Mary", "Joe", "Puncracio" will not be there anymore.... only "Chad"...

        jonSS why does the inspector bothers you? it will not show up in the end when you compile the game?

        I mean you can attach a script and override the exported values on the linked things. If it bother you then dont use the plugin? Or edit the plugin manually..

          kuligs2 its an "EditorPlugin" it also has a "EditorInspectorPlugin"
          well... when the inspector looks like this:
          I dont think i have any other options, it would not bother me in the beginning, but now its a big problem, a really big one... like hiting a wall to the point of making the plugIns useless.

          the problem is the value needs to be saved...
          if i dont use @export var all those layers will be gone into just 1 layer

          and you talk about "compile a game" i dont mean to offend... but have you seen the amount of stupid ideas in here ?
          cant save the values changed in the inspector ?
          I mean... why make an option " extends EditorInspectorPlugin ", if it doesnt save the changes you make on the editor... why not make a christmas tree instead it would look pretty and the user already knew that thing was useless...

          Use a plugIn and put it on the ( chernobyl reactor )...
          That way instead of just explonding your code, it explodes everything around it

          • xyz replied to this.

            jonSS You can implement Object::_get_property_list() to change how a particular property is handled by the engine. See Object class reference in the docs for details.

              xyz what about if i use "EditorSettings" ?
              Would it work to save the values in "editor inspector" to " EditorSettings " ?

              Is this code good to use ? The main problem here is that it would be a lot easier to save the entire "instance"

              tool
              extends EditorPlugin
              
              var some_value: String = "Default Value"
              
              func _enter_tree():
                  _load_value()
              
              func _exit_tree():
                  _save_value()
              
              func _load_value():
                  some_value = EditorSettings.get_setting("my_plugin/some_value", some_value)
              
              func _save_value():
                  EditorSettings.set_setting("my_plugin/some_value", some_value)
                  EditorSettings.save()
              • "EditorInspectorPlugin" instantiates a scene called inspector
              • that scene has an "item list node" and also lots of "spinBox" nodes. The items in itemList also have a name.
              • it would be less confusing to save the entire scene, instead of saving 1 var individually.

              Is there an option to save the entire scene instead of just one var ?

              main problem is apart from all the spinBox nodes, i dont know how to save the "itemList" it has names the user can change, and i have to run a forLoop to get the list to the same size than it was before.

              • xyz replied to this.

                jonSS Use _get_property_list(). That's how this is supposed to be handled.

                  xyz but, you mean i have to make an array ? and loop in there everytime i change nodes in the tree ?

                  • xyz replied to this.

                    jonSS Have you read the docs for _get_property_list()? It does precisely what you originaly asked for (among other things). It lets you tell the engine to store the property value as it'd do when using the @export qualifier, but not display that property in the default manner in the inspector.