All Downloads are FREE. Search and download functionalities are using the official Maven repository.

godot.extensions.NodeExt.kt Maven / Gradle / Ivy

The newest version!
@file:JvmName("NodeUtils")
package godot.extensions

import godot.Node
import godot.core.NodePath
import godot.core.StringName
import godot.core.asNodePath

@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 - 2024 Weber Informatics LLC | Privacy Policy