Topic was automatically imported from the old Question2Answer platform.
Asked By
Berkyx
Hi,
I am following a tutorial on udemy to learn about Godot. Lecturer uses godot script but i try to follow it with C# but i stumbled on a problem.
Lecturer used the following code;
@export var sword_ability: PackedScene
and i tried mimicking it with this code in C#
[Export] public PackedScene SwordAbility { get; set; }
Hello, i think that the problem is that you have not rebuilt the c# project. There are two ways to do this - try to launch the project, or click the “Build” button specially designed for this in the upper right corner of the editor. After that, the variable field should appear in the properties.
And, my question, not related to your problem; why are you using { get; set; }? I mean, if you write { get; private set; } than i can agree, but, why just { get; set; }?