gdext.internal.register.DefaultValue
See theDefaultValue companion object
The "zero value" for an exportable type — what a registered class's constructor parameter is initialised to when the user does not write an explicit default. Godot constructs instances with no arguments, so every primary-ctor param needs some value; this typeclass supplies the natural empty/null one per type, so a game class can declare
final class Player(var projectile: Projectile) extends Node2D
with no = null. The @gdexport macro's instance factory summons a DefaultValue[A] for any param lacking a user default (see Register.scala); an explicit = ... always takes precedence. Mirrors the supported export types in ExportType / RefLeaf.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article