C# PackedScene does not show up in inspector

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Berkyx


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; }

it did not worked. Whats the issue ?

:bust_in_silhouette: Reply From: Hralok

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; }?