Class PlaceableInstance
- Namespace
- GridPlacement.GDScript
- Assembly
- MoonBark.GridPlacement.GDScript.dll
Component to attach to objects that are placed by the building system by remembering the placeable resource that they were instanced from
class PlaceableInstance extends PlacementGameNode
PlaceableInstance
Fields
default_name
const default_name = "PlaceableInstance"
group_name
const group_name = "PlaceableInstance"
INSTANCE_NAME
Shared name constants\n\nBe very careful about changing these because game saves do not know if you change the string key of loaded properties.
const INSTANCE_NAME = "instance_name"
PLACEABLE
const PLACEABLE = "placeable"
TRANSFORM
const TRANSFORM = "transform"
Properties
placeable_path
Path to the placeable resource that creates or recreates instances of this gameplay object type
@export_file("*.tres", "*.res") var placeable_path: String:
placeable
var placeable: ScenePlacementEntry
passing
var passing = true
save
var save = {}
parent
var parent = get_parent()
save
var save = {}
placeable
var placeable: ScenePlacementEntry
instance
var instance: Node = placeable.packed_scene.instantiate()
placeable_instance
var placeable_instance = PlaceableInstance.new(placeable.resource_path)
Methods
resolve_placement_dependencies
func resolve_placement_dependencies(p_container: PlacementContainer) -> void:
Parameters
p_container
Returns
validate_setup
func validate_setup() -> bool:
Returns
instance_from_save
static func instance_from_save(p_save: Dictionary, p_instance_parent: Node) -> Node:
Parameters
p_savep_instance_parent
Returns
Events
placeable_path_changed
signal placeable_path_changed(placeable_path: String)