
godot.extensions.NodeExt.kt Maven / Gradle / Ivy
@file:JvmName("NodeUtils")
package godot.extensions
import godot.Node
import godot.core.NodePath
import godot.core.StringName
@Suppress("NOTHING_TO_INLINE", "UNCHECKED_CAST")
inline fun Node.getNodeAs(path: String) = getNode(path.asNodePath()) as T?
@Suppress("NOTHING_TO_INLINE", "UNCHECKED_CAST")
inline fun Node.getNodeAs(path: StringName) = getNode(path.asNodePath()) as T?
@Suppress("NOTHING_TO_INLINE", "UNCHECKED_CAST")
inline fun Node.getNodeAs(nodePath: NodePath) = getNode(nodePath) as T?
© 2015 - 2025 Weber Informatics LLC | Privacy Policy