Table of Contents

Class GridPlacementBootstrap

Namespace
MoonBark.GridPlacement.Godot.Placement
Assembly
MoonBark.GridPlacement.Godot.dll

Godot scene entry point that manages the placement system lifecycle.

Standalone vs Demo usage

Addon (standalone): This bootstrap is a thin shim. It owns lifecycle (enter/exit tree, cleanup) and emits the InitializedSignal but does NOT initialize the placement runtime by itself. For the runtime to work, a DemoBootstrapHost child node must be present in the scene tree before _Ready() runs — see the shared demo bootstrap scenes under demos/shared/bootstrap/ for the reference wiring.

Demo projects (this repo): The ECS-specific partial demos/shared/bootstrap/GridPlacementBootstrap.EcsInit.cs implements MoonBark.GridPlacement.Godot.Placement.GridPlacementBootstrap.OnPlacementContextInitialized() to wire the Friflo.Engine.ECS backend after the Context is ready.

Why this design

The full bootstrap was removed during the ECS decoupling refactor so the addon remains engine-agnostic. The DemoBootstrapHost pattern lets demo/test scenes bring their own initialization without polluting the addon boundary.

Adding to a new scene

  1. Add GridPlacementBootstrap as a node.
  2. Add a DemoBootstrapHost as a child node.
  3. Assign the same Context to both nodes.
  4. See demos/shared/bootstrap/ or docs/quick-start.md for the full reference scene hierarchy.
[GlobalClass]
[ScriptPath("res://addons/grid_placement/placement/GridPlacementBootstrap.cs")]
public sealed class GridPlacementBootstrap : Node, IDisposable
Inheritance
GodotObject
Node
GridPlacementBootstrap
Implements
Inherited Members
Node.NotificationEnterTree
Node.NotificationExitTree
Node.NotificationMovedInParent
Node.NotificationReady
Node.NotificationPaused
Node.NotificationUnpaused
Node.NotificationPhysicsProcess
Node.NotificationProcess
Node.NotificationParented
Node.NotificationUnparented
Node.NotificationSceneInstantiated
Node.NotificationDragBegin
Node.NotificationDragEnd
Node.NotificationPathRenamed
Node.NotificationChildOrderChanged
Node.NotificationInternalProcess
Node.NotificationInternalPhysicsProcess
Node.NotificationPostEnterTree
Node.NotificationDisabled
Node.NotificationEnabled
Node.NotificationResetPhysicsInterpolation
Node.NotificationEditorPreSave
Node.NotificationEditorPostSave
Node.NotificationWMMouseEnter
Node.NotificationWMMouseExit
Node.NotificationWMWindowFocusIn
Node.NotificationWMWindowFocusOut
Node.NotificationWMCloseRequest
Node.NotificationWMGoBackRequest
Node.NotificationWMSizeChanged
Node.NotificationWMDpiChange
Node.NotificationVpMouseEnter
Node.NotificationVpMouseExit
Node.NotificationWMPositionChanged
Node.NotificationOsMemoryWarning
Node.NotificationTranslationChanged
Node.NotificationWMAbout
Node.NotificationCrash
Node.NotificationOsImeUpdate
Node.NotificationApplicationResumed
Node.NotificationApplicationPaused
Node.NotificationApplicationFocusIn
Node.NotificationApplicationFocusOut
Node.NotificationTextServerChanged
Node.GetNode<T>(NodePath)
Node.GetNodeOrNull<T>(NodePath)
Node.GetOwner<T>()
Node.GetOwnerOrNull<T>()
Node.GetParent<T>()
Node.GetParentOrNull<T>()
Node._GetConfigurationWarnings()
Node._Input(InputEvent)
Node._ShortcutInput(InputEvent)
Node._UnhandledInput(InputEvent)
Node._UnhandledKeyInput(InputEvent)
Node.PrintOrphanNodes()
Node.RemoveChild(Node)
Node.HasNode(NodePath)
Node.GetNode(NodePath)
Node.GetNodeOrNull(NodePath)
Node.GetParent()
Node.HasNodeAndResource(NodePath)
Node.GetNodeAndResource(NodePath)
Node.IsInsideTree()
Node.IsPartOfEditedScene()
Node.IsAncestorOf(Node)
Node.IsGreaterThan(Node)
Node.GetPath()
Node.RemoveFromGroup(StringName)
Node.IsInGroup(StringName)
Node.GetGroups()
Node.PrintTree()
Node.PrintTreePretty()
Node.GetTreeString()
Node.GetTreeStringPretty()
Node.GetPhysicsProcessDeltaTime()
Node.IsPhysicsProcessing()
Node.GetProcessDeltaTime()
Node.IsProcessing()
Node.IsProcessingInput()
Node.IsProcessingShortcutInput()
Node.IsProcessingUnhandledInput()
Node.IsProcessingUnhandledKeyInput()
Node.CanProcess()
Node.IsDisplayedFolded()
Node.IsProcessingInternal()
Node.IsPhysicsProcessingInternal()
Node.IsPhysicsInterpolated()
Node.IsPhysicsInterpolatedAndEnabled()
Node.ResetPhysicsInterpolation()
Node.SetTranslationDomainInherited()
Node.GetWindow()
Node.GetLastExclusiveWindow()
Node.GetTree()
Node.CreateTween()
Node.GetSceneInstanceLoadPlaceholder()
Node.IsEditableInstance(Node)
Node.GetViewport()
Node.QueueFree()
Node.RequestReady()
Node.IsNodeReady()
Node.GetMultiplayerAuthority()
Node.IsMultiplayerAuthority()
Node.RpcConfig(StringName, Variant)
Node.GetRpcConfig()
Node.Rpc(StringName, params Variant[])
Node.UpdateConfigurationWarnings()
Node.CallDeferredThreadGroup(StringName, params Variant[])
Node.SetDeferredThreadGroup(StringName, Variant)
Node.CallThreadSafe(StringName, params Variant[])
Node.SetThreadSafe(StringName, Variant)
Node.Name
Node.UniqueNameInOwner
Node.SceneFilePath
Node.Owner
Node.Multiplayer
Node.ProcessMode
Node.ProcessPriority
Node.ProcessPhysicsPriority
Node.ProcessThreadGroup
Node.ProcessThreadGroupOrder
Node.ProcessThreadMessages
Node.PhysicsInterpolationMode
Node.AutoTranslateMode
Node.EditorDescription
Node.Ready
Node.Renamed
Node.TreeEntered
Node.TreeExiting
Node.TreeExited
Node.ChildEnteredTree
Node.ChildExitingTree
Node.ChildOrderChanged
Node.ReplacingBy
Node.EditorDescriptionChanged
Node.EditorStateChanged
GodotObject.NotificationPostinitialize
GodotObject.NotificationPredelete
GodotObject.NotificationExtensionReloaded
GodotObject.IsInstanceValid(GodotObject)
GodotObject.WeakRef(GodotObject)
GodotObject.Dispose()
GodotObject.ToString()
GodotObject.ToSignal(GodotObject, StringName)
GodotObject._Get(StringName)
GodotObject._GetPropertyList()
GodotObject._IterGet(Variant)
GodotObject._IterInit(Array)
GodotObject._IterNext(Array)
GodotObject._PropertyCanRevert(StringName)
GodotObject._PropertyGetRevert(StringName)
GodotObject._Set(StringName, Variant)
GodotObject._ValidateProperty(Dictionary)
GodotObject.Free()
GodotObject.GetClass()
GodotObject.Set(StringName, Variant)
GodotObject.Get(StringName)
GodotObject.SetIndexed(NodePath, Variant)
GodotObject.GetIndexed(NodePath)
GodotObject.GetPropertyList()
GodotObject.GetMethodList()
GodotObject.PropertyCanRevert(StringName)
GodotObject.PropertyGetRevert(StringName)
GodotObject.GetInstanceId()
GodotObject.SetScript(Variant)
GodotObject.GetScript()
GodotObject.SetMeta(StringName, Variant)
GodotObject.RemoveMeta(StringName)
GodotObject.GetMeta(StringName, Variant)
GodotObject.HasMeta(StringName)
GodotObject.GetMetaList()
GodotObject.HasUserSignal(StringName)
GodotObject.RemoveUserSignal(StringName)
GodotObject.EmitSignal(StringName, params Variant[])
GodotObject.Call(StringName, params Variant[])
GodotObject.CallDeferred(StringName, params Variant[])
GodotObject.SetDeferred(StringName, Variant)
GodotObject.Callv(StringName, Array)
GodotObject.HasMethod(StringName)
GodotObject.GetMethodArgumentCount(StringName)
GodotObject.HasSignal(StringName)
GodotObject.GetSignalList()
GodotObject.GetSignalConnectionList(StringName)
GodotObject.GetIncomingConnections()
GodotObject.Disconnect(StringName, Callable)
GodotObject.IsConnected(StringName, Callable)
GodotObject.HasConnections(StringName)
GodotObject.IsBlockingSignals()
GodotObject.NotifyPropertyListChanged()
GodotObject.CanTranslateMessages()
GodotObject.Tr(StringName, StringName)
GodotObject.GetTranslationDomain()
GodotObject.SetTranslationDomain(StringName)
GodotObject.IsQueuedForDeletion()
GodotObject.CancelFree()
GodotObject.NativeInstance
GodotObject.ScriptChanged
GodotObject.PropertyListChanged

Properties

Context

Shared placement context. Assign in the inspector or leave null to auto-create. All plugin systems, signals, and services are accessed through this resource.

[Export(PropertyHint.None, "")]
public PlacementContext? Context { get; set; }

Property Value

PlacementContext

Methods

_EnterTree()

Called when the node enters the Godot.SceneTree (e.g. upon instantiating, scene changing, or after calling AddChild(Node, bool, InternalMode) in a script). If the node has children, its Godot.Node._EnterTree() callback will be called first, and then that of the children.

Corresponds to the Godot.Node.NotificationEnterTree notification in _Notification(int).

public override void _EnterTree()

_ExitTree()

Called when the node is about to leave the Godot.SceneTree (e.g. upon freeing, scene changing, or after calling Godot.Node.RemoveChild(Godot.Node) in a script). If the node has children, its Godot.Node._ExitTree() callback will be called last, after all its children have left the tree.

Corresponds to the Godot.Node.NotificationExitTree notification in _Notification(int) and signal Godot.Node.TreeExiting. To get notified when the node has already left the active tree, connect to the Godot.Node.TreeExited.

public override void _ExitTree()

_PhysicsProcess(double)

Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the delta parameter will generally be constant (see exceptions below). delta is in seconds.

It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with SetPhysicsProcess(bool).

Processing happens in order of Godot.Node.ProcessPhysicsPriority, lower priority values are called first. Nodes with the same priority are processed in tree order, or top to bottom as seen in the editor (also known as pre-order traversal).

Corresponds to the Godot.Node.NotificationPhysicsProcess notification in _Notification(int).

Note: This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).

Note: delta will be larger than expected if running at a framerate lower than Godot.Engine.PhysicsTicksPerSecond / Godot.Engine.MaxPhysicsStepsPerFrame FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both _Process(double) and _PhysicsProcess(double). As a result, avoid using delta for time measurements in real-world seconds. Use the Godot.Time singleton's methods for this purpose instead, such as Godot.Time.GetTicksUsec().

public override void _PhysicsProcess(double delta)

Parameters

delta double

_Process(double)

Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the delta time since the previous frame is not constant. delta is in seconds.

It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with SetProcess(bool).

Processing happens in order of Godot.Node.ProcessPriority, lower priority values are called first. Nodes with the same priority are processed in tree order, or top to bottom as seen in the editor (also known as pre-order traversal).

Corresponds to the Godot.Node.NotificationProcess notification in _Notification(int).

Note: This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).

Note: delta will be larger than expected if running at a framerate lower than Godot.Engine.PhysicsTicksPerSecond / Godot.Engine.MaxPhysicsStepsPerFrame FPS. This is done to avoid "spiral of death" scenarios where performance would plummet due to an ever-increasing number of physics steps per frame. This behavior affects both _Process(double) and _PhysicsProcess(double). As a result, avoid using delta for time measurements in real-world seconds. Use the Godot.Time singleton's methods for this purpose instead, such as Godot.Time.GetTicksUsec().

public override void _Process(double delta)

Parameters

delta double

_Ready()

Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their Godot.Node._Ready() callbacks get triggered first, and the parent node will receive the ready notification afterwards.

Corresponds to the Godot.Node.NotificationReady notification in _Notification(int). See also the @onready annotation for variables.

Usually used for initialization. For even earlier initialization, Godot.GodotObject.GodotObject() may be used. See also Godot.Node._EnterTree().

Note: This method may be called only once for each node. After removing a node from the scene tree and adding it again, Godot.Node._Ready() will not be called a second time. This can be bypassed by requesting another call with Godot.Node.RequestReady(), which may be called anywhere before adding the node again.

public override void _Ready()

Events

InitializedSignal

Signal emitted when the bootstrap has finished initializing, for GDScript compatibility.

public event GridPlacementBootstrap.InitializedSignalEventHandler InitializedSignal

Event Type

GridPlacementBootstrap.InitializedSignalEventHandler