Hi All,
Note: I'm currently using a custom build of Godot 4.2. It is master + a commit that fixes issues with Godot's caching system overwriting my C# code when I save related nodes/scenes.
Could I please get some help with understanding what is going on here:
I have a WorldState Class that inherits Resource; One of the export variables (Value) in this class is a variant and I am unable to modify the variable in the Inspector. It only shows as <null>. But I can edit it in Notepad++ the values stick and seem to work ok behind the scenes. It only evers shows as <null>
[Export()] public Variant Value { get; set; }
I have two WorldState resources in an Array. Which I have added some debug lines to the Object that uses these WorldStates. In one of the attached images I have highlighted the output, it shows that the Variants are properly typed and this is the behaviour I am looking for. It not being able to do anything with it in the inspector, that is the issue.
Debug.Print(actionImport.Preconditions[0].Value.ToString()); Debug.Print(actionImport.Preconditions[0].Value.VariantType.ToString()); Debug.Print(actionImport.Preconditions[1].Value.ToString()); Debug.Print(actionImport.Preconditions[1].Value.VariantType.ToString());
Example Resource Files for 'World State':
[resource]
script = ExtResource("1_bokuj")
id = ""
StateName = "New World State Name"
**Value **= "asdf"
Owner = 0
TimeSinceRefresh = 0`
[resource]
script = ExtResource("1_4q5aw")
id = ""
StateName = "New World State Name"
**Value **= 1
Owner = 0
TimeSinceRefresh = 0`
I am concerned that I am doing something wrong or unsupported, or there is a bug in the Godot build that I am using.
I would appreciate some insight,
Thanks