Godot version: 4.2.0.0 mono (.Net) win64
Renderer: Forward+
Excuse me for my bad English as I`m not a native speaker.
In my project Godot always overrides exported properties of instances. Sometimes it cause bugs (For example, two enemies reference on navigation agent of one of them (each one has to reference it`s own agent). As a result they travel the map incorrect.
I want you to tell me how to fix this or to explain how to work with references and instances propely.
Steps to reproduce:
-
Create a C#/GDSkript skript and add an export variable:
- C#: [Export] NavigationAgent3D navAgent;
- GDSkript: @export var navAgent: NavigationAgent3D
-
Save the skript (Build project if you use C#) and create a new scene with root Node3D.
-
Instantiate NavigationAgent3D node as a child of root node.
-
Add your skript to Node3D and add reference on NavigationAgent3D in the inspector of Node3D.
-
Save the scene.
-
Create new scene with root Node3D and add an instance of previous scene to this scene
-
You get this image:
This works for C# too.
As you can see, the value of NavAgent has been overriden. If you will click on ‘revert’ button, button will disappear, but value of property won`t change.
What have I do to deal with this problem?