![JAR search and dependency download from the Maven repository](/logo.png)
godot.gen.godot.ShaderInclude.kt Maven / Gradle / Ivy
// THIS FILE IS GENERATED! DO NOT EDIT IT MANUALLY!
@file:Suppress("PackageDirectoryMismatch", "unused", "FunctionName", "RedundantModalityModifier",
"UNCHECKED_CAST", "JoinDeclarationAndAssignment", "USELESS_CAST",
"RemoveRedundantQualifierName", "NOTHING_TO_INLINE", "NON_FINAL_MEMBER_IN_OBJECT",
"RedundantVisibilityModifier", "RedundantUnitReturnType", "MemberVisibilityCanBePrivate")
package godot
import godot.`annotation`.GodotBaseType
import godot.core.VariantType.NIL
import godot.core.VariantType.STRING
import godot.core.memory.TransferContext
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
/**
* A snippet of shader code to be included in a [godot.Shader] with `#include`.
*
* Tutorials:
* [$DOCS_URL/tutorials/shaders/shader_reference/shader_preprocessor.html]($DOCS_URL/tutorials/shaders/shader_reference/shader_preprocessor.html)
*
* A shader include file, saved with the `.gdshaderinc` extension. This class allows you to define a custom shader snippet that can be included in a [godot.Shader] by using the preprocessor directive `#include`, followed by the file path (e.g. `#include "res://shader_lib.gdshaderinc"`). The snippet doesn't have to be a valid shader on its own.
*/
@GodotBaseType
public open class ShaderInclude : Resource() {
/**
* Returns the code of the shader include file. The returned text is what the user has written, not the full generated code used internally.
*/
public var code: String
get() {
TransferContext.writeArguments()
TransferContext.callMethod(rawPtr, ENGINEMETHOD_ENGINECLASS_SHADERINCLUDE_GET_CODE, STRING)
return (TransferContext.readReturnValue(STRING, false) as String)
}
set(`value`) {
TransferContext.writeArguments(STRING to value)
TransferContext.callMethod(rawPtr, ENGINEMETHOD_ENGINECLASS_SHADERINCLUDE_SET_CODE, NIL)
}
public override fun new(scriptIndex: Int): Boolean {
callConstructor(ENGINECLASS_SHADERINCLUDE, scriptIndex)
return true
}
public companion object
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy