-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating and Saving Mono Nodes Fails #27095
Comments
After debugging this a little further, |
Can anyone still reproduce this issue in Godot 3.5 or any later release? I've been unable to reproduce with the provided MRP in v3.5.stable.mono.official [991bb6a]. |
I would be surprised if this was fixed in 3.x as the presumed cause of the bug should still be there: scripts created from C# ( |
Oh, I misunderstood the reproduction steps. It's still happening in 3.x indeed. It results in the following scene: [gd_scene load_steps=2 format=2]
[sub_resource type="CSharpScript" id=1]
[node name="" type="Node"]
script = SubResource( 1 ) I can confirm it's fixed in [gd_scene load_steps=2 format=3]
[ext_resource type="Script" path="res://NodeScript.cs" id="1_yfurm"]
[node name="" type="Node"]
script = ExtResource("1_yfurm")
|
Godot version:
3.1
Issue description:
Given a C# class "NodeScript" which inherits from Node, I expected the following to work:
But the restoredNode loses the association with NodeScript upon being loaded. When I save the PackedScene to a file (my actual intent), I also see that the Node is saved with a CSharpScript association, but no actual association to the subclass.
I think the saved scene exhibits #17689, but the underlying issue is that the Ctor of NodeScript doesn't actually associate the right script with the node.
Minimal project:
ScriptChange.zip
The text was updated successfully, but these errors were encountered: