godot.extensions.ResourceLoaderExt.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("ResourceLoaderUtils")
package godot.extensions
import godot.Resource
import godot.ResourceLoader
@Suppress("NOTHING_TO_INLINE", "UNCHECKED_CAST")
inline fun ResourceLoader.loadAs(
path: String,
typeHint: String = "",
cacheMode: ResourceLoader.CacheMode = ResourceLoader.CacheMode.CACHE_MODE_REUSE
): T? {
return load(path, typeHint, cacheMode) as T?
}