YarnProjectResource
resource containing a compiled yarn project. created by importing .yarnproject files.
class_name YarnProjectResource
extends ResourceInherits from Resource
#Properties
#compiled_program
var compiled_program: PackedByteArray = PackedByteArray()Type PackedByteArray
#diagnostics
var diagnostics: Array = []Type Array
#enums
enum name -> { "raw_type": "Number" or "String", "description": String, "cases": [{ "name": String, "value": float or String, "description": String }] }
var enums: Dictionary = {}Type Dictionary
#line_info
var line_info: Dictionary = {}Type Dictionary
#line_metadata
line_id -> tags array
var line_metadata: Dictionary = {}Type Dictionary
#source_files
var source_files: PackedStringArray = PackedStringArray()Type PackedStringArray
#string_table
line_id -> text
var string_table: Dictionary = {}Type Dictionary
#variable_types
variable name -> type name: "Number", "String", "Bool", or an enum's name
var variable_types: Dictionary = {}Type Dictionary
#Methods
#clear_cache()
func clear_cache() -> void#get_enum_case_name(String, Variant)
The name of the case of
enum_name whose raw value is value, or an empty string if there isn't one.func get_enum_case_name(enum_name: String, value: Variant) -> StringParameters
enum_nameStringvalueVariant
Returns String
#get_enum_cases(String)
The cases of an enum in teh order they're declared. Each gets a Dictionary with "name", "value" and "description". Empty if there's no such enum!
func get_enum_cases(enum_name: String) -> ArrayParameters
enum_nameString
Returns Array
#get_enum_value(String, String)
The raw value of
case_name in enum_name, or null if the enum or the case doesn't exist.func get_enum_value(enum_name: String, case_name: String) -> VariantParameters
enum_nameStringcase_nameString
Returns Variant
#get_line_ids_for_nodes(PackedStringArray)
func get_line_ids_for_nodes(node_names: PackedStringArray) -> PackedStringArrayParameters
node_namesPackedStringArray
Returns PackedStringArray
#get_node_names()
func get_node_names() -> PackedStringArrayReturns PackedStringArray
#get_program()
func get_program() -> YarnProgramReturns YarnProgram
#get_variable_type(String)
The declared type of
variable_name: "Number", "String", "Bool", or the name of an enum. Empty if the variable isn't declared...func get_variable_type(variable_name: String) -> StringParameters
variable_nameString
Returns String
#has_enum(String)
Whether the project declares an enum called
enum_name.func has_enum(enum_name: String) -> boolParameters
enum_nameString
Returns bool
#has_node(String)
func has_node(node_name: String) -> boolParameters
node_nameString
Returns bool
Generated from Yarn Spinner for Godot GDScript 3.3.