godot.extensions.PackedSceneExt.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of godot-library-release Show documentation
Show all versions of godot-library-release Show documentation
Contains godot api as kotlin classes and jvm cpp interaction code.
@file:JvmName("PackedSceneUtils")
package godot.extensions
import godot.Node
import godot.PackedScene
@Suppress("NOTHING_TO_INLINE", "UNCHECKED_CAST")
inline fun PackedScene.instantiateAs(
editState: PackedScene.GenEditState = PackedScene.GenEditState.GEN_EDIT_STATE_DISABLED
): T? {
return instantiate(editState) as T?
}