DefaultValue

gdext.internal.register.DefaultValue
See theDefaultValue companion object
trait DefaultValue[A]

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 Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def default: A