C# Equivalent of class_name keyword?

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

Hi. I’ve been following video tutorials to quickly get to grips with Godot. I’ve also been converting any associated GDscript to C#, as that’s what I’m familiar with.

One tutorial creates a class (extending the Resource class) to generate data objects. This custom class implements the class_name keyword so that it will be selectable from the Create New Resource interface.

My question is: how can I replicate this within a C# script?

For bonus points, is there a resource where I could have found this information? I’ve yet to find good documentation on Godot’s implementation of C#.

:bust_in_silhouette: Reply From: MitchReidNZ

This might be worth opening an issue on github for.
I’ve played around a bit and haven’t been able to find anything. Maybe C# can’t export resources in 3.2?

In general though, the C# class name replaces the need for the class_name keyword.
Eg, if I have a Card C# script attached to a node, with an Attributes property, I can read it with:
var attributes = GetNode(“path/to/card/node”).Attributes;