Click or drag to resize

PackedSceneInstanceOrNullT Method

Instantiates the scene's node hierarchy, returning null on failure. Triggers child scene instantiation(s). Triggers a `Node.NotificationInstanced` notification on the root node.

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public T InstanceOrNull<T>(
	PackedSceneGenEditState editState = PackedSceneGenEditState.Disabled
)
where T : class

Parameters

editState (Optional)
Type: GodotPackedSceneGenEditState

[Missing <param name="editState"/> documentation for "M:Godot.PackedScene.InstanceOrNull``1(Godot.PackedScene.GenEditState)"]

Type Parameters

T
The type to cast to. Should be a descendant of Node.

Return Value

Type: T

[Missing <returns> documentation for "M:Godot.PackedScene.InstanceOrNull``1(Godot.PackedScene.GenEditState)"]

See Also