PropertyRegistration

gdext.internal.register.PropertyRegistration

Registers an @export-style property on a registered class.

Godot models a property as a name plus a setter and getter method (by name). So this registers a set_<name> and get_<name> method pair (via MethodRegistration) and then links them with classdb_register_extension_class_property. The property then appears in the inspector and is readable/writable from GDScript.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def registerCategory(className: String, name: String): Unit
def registerExport[A](className: String, propertyName: String, get: GodotScriptClass => A, set: (GodotScriptClass, A) => Unit, hint: ExportHint = ...)(using et: ExportType[A]): Unit

Register an exported property using an ExportType — the path the macro uses for all exports. Threads the variant type plus the inspector hint / hint_string / class_name / usage into the PropertyInfo, and records any scene-root requirement for the editor plugin.

Register an exported property using an ExportType — the path the macro uses for all exports. Threads the variant type plus the inspector hint / hint_string / class_name / usage into the PropertyInfo, and records any scene-root requirement for the editor plugin.

Attributes

def registerGroup(className: String, name: String, prefix: String): Unit

Inspector section markers (@export_group / @export_subgroup / @export_category). These are positional: each applies to every property registered after it, so the macro emits them interleaved in source order. Group and subgroup have dedicated ClassDB calls; category has none, so it is emitted as a NIL marker property carrying USAGE_CATEGORY.

Inspector section markers (@export_group / @export_subgroup / @export_category). These are positional: each applies to every property registered after it, so the macro emits them interleaved in source order. Group and subgroup have dedicated ClassDB calls; category has none, so it is emitted as a NIL marker property carrying USAGE_CATEGORY.

Attributes

def registerProperty[A](className: String, propertyName: String, get: GodotScriptClass => A, set: (GodotScriptClass, A) => Unit)(using tv: ToVariant[A], fv: FromVariant[A], vt: VariantTypeOf[A]): Unit
def registerSubgroup(className: String, name: String, prefix: String): Unit