Skip to content

@tool YggdrasilTree API

Resource that stores tree data, visual configuration, node collections, prefab mappings, attributes, and runtime YggdrasilTreeState.


Properties

Type Name Default
int version 1
String id ""
String name ""
bool revealed true
bool allocation true
bool preallocation true
Vector2 size Vector2(5000, 5000)
Color bg_color Color(0.1, 0.1, 0.1)
Texture2D bg_texture null
Texture2D line_texture_normal null
Texture2D line_texture_intermediate null
Texture2D line_texture_active null
int id_counter 0
float border_scale 1.5
Dictionary[NodeType, Vector2] icon_sizes {}
Dictionary[NodeType, Texture2D] icons {}
Dictionary[NodeType, Vector2] node_size {}
Array[YggdrasilNode] nodes []
Array[YggdrasilNode] decorations []
Dictionary[NodeType, Array[YggdrasilPrefab]] prefabs {}
Dictionary[String, YggdrasilAttribute] attributes {}

Methods

Type Name
Vector2 get_node_size(node_type: NodeType)
int get_next_id()

Property Descriptions

int version = 1

TODO

String id = ""

TODO

String name = ""

TODO

bool revealed = true

TODO

bool allocation = true

TODO

bool preallocation = true

TODO

Vector2 size = Vector2(5000, 5000)

TODO

Color bg_color = Color(0.1, 0.1, 0.1)

TODO

Texture2D bg_texture = null

TODO

Texture2D line_texture_normal = null

TODO

Texture2D line_texture_intermediate = null

TODO

Texture2D line_texture_active = null

TODO

int id_counter = 0

TODO

float border_scale = 1.5

TODO

Dictionary[NodeType, Vector2] icon_sizes = {}

TODO

Dictionary[NodeType, Texture2D] icons = {}

TODO

Dictionary[NodeType, Vector2] node_size = {}

TODO

Array[YggdrasilNode] nodes = []

TODO

Array[YggdrasilNode] decorations = []

TODO

Dictionary[NodeType, Array[YggdrasilPrefab]] prefabs = {}

TODO

Dictionary[String, YggdrasilAttribute] attributes = {}

TODO

Method Descriptions

Vector2 get_node_size(node_type: NodeType)

Returns the configured size for the given NodeType. Returns Vector2.ZERO if no size is defined.

int get_next_id()

Increments the internal id_counter and returns the next available node identifier.