Click or drag to resize

SpatialMaterial Class

This provides a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details.

Inheritance Hierarchy

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public class SpatialMaterial : Material

The SpatialMaterial type exposes the following members.

Constructors
  NameDescription
Public methodSpatialMaterial
Initializes a new instance of the SpatialMaterial class
Top
Properties
  NameDescription
Public propertyAlbedoColor

The material's base color.

Public propertyAlbedoTexture

Texture to multiply by AlbedoColor. Used for basic texturing of objects.

Public propertyAnisotropy

The strength of the anisotropy effect.

Public propertyAnisotropyEnabled

If true, anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. Mesh tangents are needed for this to work. If the mesh does not contain tangents the anisotropy effect will appear broken.

Public propertyAnisotropyFlowmap

Texture that offsets the tangent map for anisotropy calculations.

Public propertyAoEnabled

If true, ambient occlusion is enabled. Ambient occlusion darkens areas based on the AoTexture.

Public propertyAoLightAffect

Amount that ambient occlusion affects lighting from lights. If 0, ambient occlusion only affects ambient light. If 1, ambient occlusion affects lights just as much as it affects ambient light. This can be used to impact the strength of the ambient occlusion effect, but typically looks unrealistic.

Public propertyAoOnUv2

If true, use UV2 coordinates to look up from the AoTexture.

Public propertyAoTexture

Texture that defines the amount of ambient occlusion for a given point on the object.

Public propertyAoTextureChannel

Specifies the channel of the AoTexture in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.

Public propertyClearcoat

Sets the strength of the clearcoat effect. Setting to 0 looks the same as disabling the clearcoat effect.

Public propertyClearcoatEnabled

If true, clearcoat rendering is enabled. Adds a secondary transparent pass to the lighting calculation resulting in an added specular blob. This makes materials appear as if they have a clear layer on them that can be either glossy or rough.

Public propertyClearcoatGloss

Sets the roughness of the clearcoat pass. A higher value results in a smoother clearcoat while a lower value results in a rougher clearcoat.

Public propertyClearcoatTexture

Texture that defines the strength of the clearcoat effect and the glossiness of the clearcoat. Strength is specified in the red channel while glossiness is specified in the green channel.

Public propertyDepthDeepParallax

If true, the shader will read depth texture at multiple points along the view ray to determine occlusion and parrallax. This can be very performance demanding, but results in more realistic looking depth mapping.

Public propertyDepthEnabled

If true, depth mapping is enabled (also called "parallax mapping" or "height mapping"). See also NormalEnabled.

Note: Depth mapping is not supported if triplanar mapping is used on the same material. The value of DepthEnabled will be ignored if Uv1Triplanar is enabled.

Public propertyDepthFlipBinormal

If true, direction of the binormal is flipped before using in the depth effect. This may be necessary if you have encoded your binormals in a way that is conflicting with the depth effect.

Public propertyDepthFlipTangent

If true, direction of the tangent is flipped before using in the depth effect. This may be necessary if you have encoded your tangents in a way that is conflicting with the depth effect.

Public propertyDepthMaxLayers

Number of layers to use when using DepthDeepParallax and the view direction is perpendicular to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp.

Public propertyDepthMinLayers

Number of layers to use when using DepthDeepParallax and the view direction is parallel to the surface of the object. A higher number will be more performance demanding while a lower number may not look as crisp.

Public propertyDepthScale

Scales the depth offset effect. A higher number will create a larger depth.

Public propertyDepthTexture

Texture used to determine depth at a given pixel. Depth is always stored in the red channel.

Public propertyDetailAlbedo

Texture that specifies the color of the detail overlay.

Public propertyDetailBlendMode

Specifies how the DetailAlbedo should blend with the current ALBEDO. See SpatialMaterialBlendMode for options.

Public propertyDetailEnabled

If true, enables the detail overlay. Detail is a second texture that gets mixed over the surface of the object based on DetailMask. This can be used to add variation to objects, or to blend between two different albedo/normal textures.

Public propertyDetailMask

Texture used to specify how the detail textures get blended with the base textures.

Public propertyDetailNormal

Texture that specifies the per-pixel normal of the detail overlay.

Note: Godot expects the normal map to use X+, Y-, and Z+ coordinates. See this page for a comparison of normal map coordinates expected by popular engines.

Public propertyDetailUvLayer

Specifies whether to use UV or UV2 for the detail layer. See SpatialMaterialDetailUV for options.

Public propertyDistanceFadeMaxDistance

Distance at which the object appears fully opaque.

Note: If distance_fade_max_distance is less than distance_fade_min_distance, the behavior will be reversed. The object will start to fade away at distance_fade_max_distance and will fully disappear once it reaches distance_fade_min_distance.

Public propertyDistanceFadeMinDistance

Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible.

Note: If distance_fade_min_distance is greater than distance_fade_max_distance, the behavior will be reversed. The object will start to fade away at distance_fade_max_distance and will fully disappear once it reaches distance_fade_min_distance.

Public propertyDistanceFadeMode
Public propertyDynamicObject
Gets a new DynamicGodotObject associated with this instance.
(Inherited from Object.)
Public propertyEmission

The emitted light's color. See EmissionEnabled.

Public propertyEmissionEnabled

If true, the body emits light. Emitting light makes the object appear brighter. The object can also cast light on other objects if a GIProbe or BakedLightmap is used and this object is used in baked lighting.

Public propertyEmissionEnergy

The emitted light's strength. See EmissionEnabled.

Public propertyEmissionOnUv2

Use UV2 to read from the EmissionTexture.

Public propertyEmissionOperator
Public propertyEmissionTexture

Texture that specifies how much surface emits light at a given point.

Public propertyFlagsAlbedoTexForceSrgb

Forces a conversion of the AlbedoTexture from sRGB space to linear space.

Public propertyFlagsDisableAmbientLight

If true, the object receives no ambient light.

Public propertyFlagsDoNotReceiveShadows

If true, the object receives no shadow that would otherwise be cast onto it.

Public propertyFlagsEnsureCorrectNormals

If true, the shader will compute extra operations to make sure the normal stays correct when using a non-uniform scale. Only enable if using non-uniform scaling.

Public propertyFlagsFixedSize

If true, the object is rendered at the same size regardless of distance.

Public propertyFlagsNoDepthTest

If true, depth testing is disabled and the object will be drawn in render order.

Public propertyFlagsTransparent

If true, transparency is enabled on the body. See also ParamsBlendMode.

Public propertyFlagsUnshaded

If true, the object is unaffected by lighting.

Public propertyFlagsUsePointSize

If true, render point size can be changed.

Note: this is only effective for objects whose geometry is point-based rather than triangle-based. See also ParamsPointSize.

Public propertyFlagsUseShadowToOpacity

If true, enables the "shadow to opacity" render mode where lighting modifies the alpha so shadowed areas are opaque and non-shadowed areas are transparent. Useful for overlaying shadows onto a camera feed in AR.

Public propertyFlagsVertexLighting

If true, lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices.

Public propertyFlagsWorldTriplanar

If true, triplanar mapping is calculated in world space rather than object local space. See also Uv1Triplanar.

Public propertyMetallic

A high value makes the material appear more like a metal. Non-metals use their albedo as the diffuse color and add diffuse to the specular reflection. With non-metals, the reflection appears on top of the albedo color. Metals use their albedo as a multiplier to the specular reflection and set the diffuse color to black resulting in a tinted reflection. Materials work better when fully metal or fully non-metal, values between 0 and 1 should only be used for blending between metal and non-metal sections. To alter the amount of reflection use Roughness.

Public propertyMetallicSpecular

Sets the size of the specular lobe. The specular lobe is the bright spot that is reflected from light sources.

Note: unlike Metallic, this is not energy-conserving, so it should be left at 0.5 in most cases. See also Roughness.

Public propertyMetallicTexture

Texture used to specify metallic for an object. This is multiplied by Metallic.

Public propertyMetallicTextureChannel

Specifies the channel of the MetallicTexture in which the metallic information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.

Public propertyNativeInstance (Inherited from Object.)
Public propertyNextPass

Sets the Material to be used for the next pass. This renders the object again using a different material.

Note: only applies to SpatialMaterials and ShaderMaterials with type "Spatial".

(Inherited from Material.)
Public propertyNormalEnabled

If true, normal mapping is enabled.

Public propertyNormalScale

The strength of the normal map's effect.

Public propertyNormalTexture

Texture used to specify the normal at a given pixel. The normal_texture only uses the red and green channels. The normal read from normal_texture is oriented around the surface normal provided by the Mesh.

Note: Godot expects the normal map to use X+, Y-, and Z+ coordinates. See this page for a comparison of normal map coordinates expected by popular engines.

Public propertyParamsAlphaScissorThreshold

Threshold at which the alpha scissor will discard values.

Public propertyParamsBillboardKeepScale

If true, the shader will keep the scale set for the mesh. Otherwise the scale is lost when billboarding. Only applies when ParamsBillboardMode is .

Public propertyParamsBillboardMode

Controls how the object faces the camera. See SpatialMaterialBillboardMode.

Note: Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See GitHub issue #41567 for details.

Public propertyParamsBlendMode

The material's blend mode.

Note: Values other than Mix force the object into the transparent pipeline. See SpatialMaterialBlendMode.

Public propertyParamsCullMode

Which side of the object is not drawn when backfaces are rendered. See SpatialMaterialCullMode.

Public propertyParamsDepthDrawMode
Public propertyParamsDiffuseMode
Public propertyParamsGrow

If true, enables the vertex grow setting. See ParamsGrowAmount.

Public propertyParamsGrowAmount

Grows object vertices in the direction of their normals.

Public propertyParamsLineWidth

Currently unimplemented in Godot.

Public propertyParamsPointSize

The point size in pixels. See FlagsUsePointSize.

Public propertyParamsSpecularMode
Public propertyParamsUseAlphaScissor

If true, the shader will discard all pixels that have an alpha value less than ParamsAlphaScissorThreshold.

Public propertyParticlesAnimHFrames

The number of horizontal frames in the particle sprite sheet. Only enabled when using . See ParamsBillboardMode.

Public propertyParticlesAnimLoop

If true, particle animations are looped. Only enabled when using . See ParamsBillboardMode.

Public propertyParticlesAnimVFrames

The number of vertical frames in the particle sprite sheet. Only enabled when using . See ParamsBillboardMode.

Public propertyProximityFadeDistance

Distance over which the fade effect takes place. The larger the distance the longer it takes for an object to fade.

Public propertyProximityFadeEnable

If true, the proximity fade effect is enabled. The proximity fade effect fades out each pixel based on its distance to another object.

Public propertyRefractionEnabled

If true, the refraction effect is enabled. Distorts transparency based on light from behind the object.

Public propertyRefractionScale

The strength of the refraction effect.

Public propertyRefractionTexture

Texture that controls the strength of the refraction per-pixel. Multiplied by RefractionScale.

Public propertyRefractionTextureChannel

Specifies the channel of the AoTexture in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.

Public propertyRenderPriority

Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects.

Note: this only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority).

(Inherited from Material.)
Public propertyResourceLocalToScene

If true, the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene.

(Inherited from Resource.)
Public propertyResourceName

The name of the resource. This is an optional identifier. If ResourceName is not empty, its value will be displayed to represent the current resource in the editor inspector. For built-in scripts, the ResourceName will be displayed as the tab name in the script editor.

(Inherited from Resource.)
Public propertyResourcePath

The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index.

(Inherited from Resource.)
Public propertyRim

Sets the strength of the rim lighting effect.

Public propertyRimEnabled

If true, rim effect is enabled. Rim lighting increases the brightness at glancing angles on an object.

Public propertyRimTexture

Texture used to set the strength of the rim lighting effect per-pixel. Multiplied by Rim.

Public propertyRimTint

The amount of to blend light and albedo color when rendering rim effect. If 0 the light color is used, while 1 means albedo color is used. An intermediate value generally works best.

Public propertyRoughness

Surface reflection. A value of 0 represents a perfect mirror while a value of 1 completely blurs the reflection. See also Metallic.

Public propertyRoughnessTexture

Texture used to control the roughness per-pixel. Multiplied by Roughness.

Public propertyRoughnessTextureChannel

Specifies the channel of the AoTexture in which the ambient occlusion information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.

Public propertySubsurfScatterEnabled

If true, subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges.

Public propertySubsurfScatterStrength

The strength of the subsurface scattering effect.

Public propertySubsurfScatterTexture

Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by SubsurfScatterStrength.

Public propertyTransmission

The color used by the transmission effect. Represents the light passing through an object.

Public propertyTransmissionEnabled

If true, the transmission effect is enabled.

Public propertyTransmissionTexture

Texture used to control the transmission effect per-pixel. Added to Transmission.

Public propertyUv1Offset

How much to offset the UV coordinates. This amount will be added to UV in the vertex function. This can be used to offset a texture.

Public propertyUv1Scale

How much to scale the UV coordinates. This is multiplied by UV in the vertex function.

Public propertyUv1Triplanar

If true, instead of using UV textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing.

Public propertyUv1TriplanarSharpness

A lower number blends the texture more softly while a higher number blends the texture more sharply.

Public propertyUv2Offset

How much to offset the UV2 coordinates. This amount will be added to UV2 in the vertex function. This can be used to offset a texture.

Public propertyUv2Scale

How much to scale the UV2 coordinates. This is multiplied by UV2 in the vertex function.

Public propertyUv2Triplanar

If true, instead of using UV2 textures will use a triplanar texture lookup to determine how to apply textures. Triplanar uses the orientation of the object's surface to blend between texture coordinates. It reads from the source texture 3 times, once for each axis and then blends between the results based on how closely the pixel aligns with each axis. This is often used for natural features to get a realistic blend of materials. Because triplanar texturing requires many more texture reads per-pixel it is much slower than normal UV texturing. Additionally, because it is blending the texture between the three axes, it is unsuitable when you are trying to achieve crisp texturing.

Public propertyUv2TriplanarSharpness

A lower number blends the texture more softly while a higher number blends the texture more sharply.

Public propertyVertexColorIsSrgb

If true, the model's vertex colors are processed as sRGB mode.

Public propertyVertexColorUseAsAlbedo

If true, the vertex color is used as albedo color.

Top
Methods
  NameDescription
Public method_Get

Virtual method which can be overridden to customize the return value of Get(String).

Returns the given property. Returns null if the property does not exist.

(Inherited from Object.)
Public method_GetPropertyList

Virtual method which can be overridden to customize the return value of GetPropertyList.

Returns the object's property list as an Array of dictionaries.

Each property's Dictionary must contain at least name: String and type: int (see VariantType) entries. Optionally, it can also include hint: int (see PropertyHint), hint_string: String, and usage: int (see PropertyUsageFlags).

(Inherited from Object.)
Public method_Notification

Called whenever the object receives a notification, which is identified in what by a constant. The base Object has two constants and , but subclasses such as Node define a lot more notifications which are also received by this method.

(Inherited from Object.)
Public method_Set

Virtual method which can be overridden to customize the return value of Set(String, Object).

Sets a property. Returns true if the property exists.

(Inherited from Object.)
Public method_SetupLocalToScene

Virtual function which can be overridden to customize the behavior value of SetupLocalToScene.

(Inherited from Resource.)
Public methodAddUserSignal

Adds a user-defined signal. Arguments are optional, but can be added as an Array of dictionaries, each containing name: String and type: int (see VariantType) entries.

(Inherited from Object.)
Public methodCall

Calls the method on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:

call("set", "position", Vector2(42.0, 0.0))

Note: In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).

(Inherited from Object.)
Public methodCallDeferred

Calls the method on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:

call_deferred("set", "position", Vector2(42.0, 0.0))

Note: In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase).

(Inherited from Object.)
Public methodCallv

Calls the method on the object and returns the result. Contrarily to Call(String, Object), this method does not support a variable number of arguments but expects all parameters to be via a single Array.

callv("set", [ "position", Vector2(42.0, 0.0) ])

(Inherited from Object.)
Public methodCanTranslateMessages

Returns true if the object can translate strings. See SetMessageTranslation(Boolean) and Tr(String).

(Inherited from Object.)
Public methodConnect

Connects a signal to a method on a target object. Pass optional binds to the call as an Array of parameters. These parameters will be passed to the method after any parameter used in the call to EmitSignal(String, Object). Use flags to set deferred or one-shot connections. See ObjectConnectFlags constants.

A signal can only be connected once to a method. It will throw an error if already connected, unless the signal was connected with . To avoid this, first, use IsConnected(String, Object, String) to check for existing connections.

If the target is destroyed in the game's lifecycle, the connection will be lost.

Examples:

connect("pressed", self, "_on_Button_pressed") # BaseButton signal
connect("text_entered", self, "_on_LineEdit_text_entered") # LineEdit signal
connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # User-defined signal

An example of the relationship between binds passed to Connect(String, Object, String, Array, UInt32) and parameters used when calling EmitSignal(String, Object):

connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # weapon_type and damage are passed last
emit_signal("hit", "Dark lord", 5) # "Dark lord" and 5 are passed first
func _on_Player_hit(hit_by, level, weapon_type, damage):
    print("Hit by %s (lvl %d) with weapon %s for %d damage" % [hit_by, level, weapon_type, damage])

(Inherited from Object.)
Public methodDisconnect

Disconnects a signal from a method on the given target.

If you try to disconnect a connection that does not exist, the method will throw an error. Use IsConnected(String, Object, String) to ensure that the connection exists.

(Inherited from Object.)
Public methodDispose (Inherited from Object.)
Protected methodDispose(Boolean) (Inherited from Object.)
Public methodDuplicate

Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing true to the subresources argument which will copy the subresources.

Note: If subresources is true, this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared.

(Inherited from Resource.)
Public methodEmitChanged

Emits the changed signal.

If external objects which depend on this resource should be updated, this method must be called manually whenever the state of this resource has changed (such as modification of properties).

The method is equivalent to:

emit_signal("changed")

Note: This method is called automatically for built-in resources.

(Inherited from Resource.)
Public methodEmitSignal

Emits the given signal. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example:

emit_signal("hit", weapon_type, damage)
emit_signal("game_over")

(Inherited from Object.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodFree

Deletes the object from memory immediately. For Nodes, you may want to use QueueFree to queue the node for safe deletion at the end of the current frame.

Important: If you have a variable pointing to an object, it will not be assigned to null once the object is freed. Instead, it will point to a previously freed instance and you should validate it with @GDScript.is_instance_valid before attempting to call its methods or access its properties.

(Inherited from Object.)
Public methodGet

Returns the Variant value of the given property. If the property doesn't exist, this will return null.

Note: In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).

(Inherited from Object.)
Public methodGetAlbedo Obsolete.
Public methodGetAlphaScissorThreshold Obsolete.
Public methodGetAnisotropy Obsolete.
Public methodGetAoLightAffect Obsolete.
Public methodGetAoTextureChannel Obsolete.
Public methodGetBillboardMode Obsolete.
Public methodGetBlendMode Obsolete.
Public methodGetClass

Returns the object's class as a String.

(Inherited from Object.)
Public methodGetClearcoat Obsolete.
Public methodGetClearcoatGloss Obsolete.
Public methodGetCullMode Obsolete.
Public methodGetDepthDeepParallaxFlipBinormal Obsolete.
Public methodGetDepthDeepParallaxFlipTangent Obsolete.
Public methodGetDepthDeepParallaxMaxLayers Obsolete.
Public methodGetDepthDeepParallaxMinLayers Obsolete.
Public methodGetDepthDrawMode Obsolete.
Public methodGetDepthScale Obsolete.
Public methodGetDetailBlendMode Obsolete.
Public methodGetDetailUv Obsolete.
Public methodGetDiffuseMode Obsolete.
Public methodGetDistanceFade Obsolete.
Public methodGetDistanceFadeMaxDistance Obsolete.
Public methodGetDistanceFadeMinDistance Obsolete.
Public methodGetEmission Obsolete.
Public methodGetEmissionEnergy Obsolete.
Public methodGetEmissionOperator Obsolete.
Public methodGetFeature Obsolete.
Public methodGetFlag Obsolete.

Returns true, if the specified flag is enabled. See SpatialMaterialFlags enumerator for options.

Public methodGetGrow Obsolete.
Public methodGetHashCode (Inherited from Object.)
Public methodGetIncomingConnections

Returns an Array of dictionaries with information about signals that are connected to the object.

Each Dictionary contains three String entries:

- source is a reference to the signal emitter.

- signal_name is the name of the connected signal.

- method_name is the name of the method to which the signal is connected.

(Inherited from Object.)
Public methodGetIndexed

Gets the object's property indexed by the given NodePath. The node path should be relative to the current object and can use the colon character (:) to access nested properties. Examples: "position:x" or "material:next_pass:blend_mode".

(Inherited from Object.)
Public methodGetInstanceId

Returns the object's unique instance ID.

This ID can be saved in EncodedObjectAsID, and can be used to retrieve the object instance with @GDScript.instance_from_id.

(Inherited from Object.)
Public methodGetLineWidth Obsolete.
Public methodGetLocalScene

If ResourceLocalToScene is enabled and the resource was loaded from a PackedScene instantiation, returns the local scene where this resource's unique copy is in use. Otherwise, returns null.

(Inherited from Resource.)
Public methodGetMeta

Returns the object's metadata entry for the given name.

(Inherited from Object.)
Public methodGetMetaList

Returns the object's metadata as a String.

(Inherited from Object.)
Public methodGetMetallic Obsolete.
Public methodGetMetallicTextureChannel Obsolete.
Public methodGetMethodList

Returns the object's methods and their signatures as an Array.

(Inherited from Object.)
Public methodGetName Obsolete. (Inherited from Resource.)
Public methodGetNextPass Obsolete. (Inherited from Material.)
Public methodGetNormalScale Obsolete.
Public methodGetParticlesAnimHFrames Obsolete.
Public methodGetParticlesAnimLoop Obsolete.
Public methodGetParticlesAnimVFrames Obsolete.
Public methodGetPath Obsolete. (Inherited from Resource.)
Public methodGetPointSize Obsolete.
Public methodGetPropertyList

Returns the object's property list as an Array of dictionaries.

Each property's Dictionary contain at least name: String and type: int (see VariantType) entries. Optionally, it can also include hint: int (see PropertyHint), hint_string: String, and usage: int (see PropertyUsageFlags).

(Inherited from Object.)
Public methodGetProximityFadeDistance Obsolete.
Public methodGetRefraction Obsolete.
Public methodGetRefractionTextureChannel Obsolete.
Public methodGetRenderPriority Obsolete. (Inherited from Material.)
Public methodGetRid

Returns the RID of the resource (or an empty RID). Many resources (such as Texture, Mesh, etc) are high-level abstractions of resources stored in a server, so this function will return the original RID.

(Inherited from Resource.)
Public methodGetRim Obsolete.
Public methodGetRimTint Obsolete.
Public methodGetRoughness Obsolete.
Public methodGetRoughnessTextureChannel Obsolete.
Public methodGetScript

Returns the object's Script instance, or null if none is assigned.

(Inherited from Object.)
Public methodGetSignalConnectionList

Returns an Array of connections for the given signal.

(Inherited from Object.)
Public methodGetSignalList

Returns the list of signals as an Array of dictionaries.

(Inherited from Object.)
Public methodGetSpecular Obsolete.
Public methodGetSpecularMode Obsolete.
Public methodGetSubsurfaceScatteringStrength Obsolete.
Public methodGetTexture Obsolete.
Public methodGetTransmission Obsolete.
Public methodGetType (Inherited from Object.)
Public methodGetUv1Offset Obsolete.
Public methodGetUv1Scale Obsolete.
Public methodGetUv1TriplanarBlendSharpness Obsolete.
Public methodGetUv2Offset Obsolete.
Public methodGetUv2Scale Obsolete.
Public methodGetUv2TriplanarBlendSharpness Obsolete.
Public methodHasMeta

Returns true if a metadata entry is found with the given name.

(Inherited from Object.)
Public methodHasMethod

Returns true if the object contains the given method.

(Inherited from Object.)
Public methodHasSignal

Returns true if the given signal exists.

(Inherited from Object.)
Public methodHasUserSignal

Returns true if the given user-defined signal exists. Only signals added using AddUserSignal(String, Array) are taken into account.

(Inherited from Object.)
Public methodInitRef

Initializes the internal reference counter. Use this only if you really know what you are doing.

Returns whether the initialization was successful.

(Inherited from Reference.)
Public methodIsBlockingSignals

Returns true if signal emission blocking is enabled.

(Inherited from Object.)
Public methodIsClass

Returns true if the object inherits from the given class.

(Inherited from Object.)
Public methodIsConnected

Returns true if a connection exists for a given signal, target, and method.

(Inherited from Object.)
Public methodIsDepthDeepParallaxEnabled Obsolete.
Public methodIsGrowEnabled Obsolete.
Public methodIsLocalToScene Obsolete. (Inherited from Resource.)
Public methodIsProximityFadeEnabled Obsolete.
Public methodIsQueuedForDeletion (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodNotification

Send a given notification to the object, which will also trigger a call to the _Notification(Int32) method of all classes that the object inherits from.

If reversed is true, _Notification(Int32) is called first on the object's own class, and then up to its successive parent classes. If reversed is false, _Notification(Int32) is called first on the highest ancestor (Object itself), and then down to its successive inheriting classes.

(Inherited from Object.)
Public methodPropertyListChangedNotify

Notify the editor that the property list has changed, so that editor plugins can take the new values into account. Does nothing on export builds.

(Inherited from Object.)
Public methodReference_

Increments the internal reference counter. Use this only if you really know what you are doing.

Returns true if the increment was successful, false otherwise.

(Inherited from Reference.)
Public methodRemoveMeta

Removes a given entry from the object's metadata. See also SetMeta(String, Object).

(Inherited from Object.)
Public methodSet

Assigns a new value to the given property. If the property does not exist, nothing will happen.

Note: In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).

(Inherited from Object.)
Public methodSetAlbedo Obsolete.
Public methodSetAlphaScissorThreshold Obsolete.
Public methodSetAnisotropy Obsolete.
Public methodSetAoLightAffect Obsolete.
Public methodSetAoTextureChannel Obsolete.
Public methodSetBillboardMode Obsolete.
Public methodSetBlendMode Obsolete.
Public methodSetBlockSignals

If set to true, signal emission is blocked.

(Inherited from Object.)
Public methodSetClearcoat Obsolete.
Public methodSetClearcoatGloss Obsolete.
Public methodSetCullMode Obsolete.
Public methodSetDeferred

Assigns a new value to the given property, after the current frame's physics step. This is equivalent to calling Set(String, Object) via CallDeferred(String, Object), i.e. call_deferred("set", property, value).

Note: In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase).

(Inherited from Object.)
Public methodSetDepthDeepParallax Obsolete.
Public methodSetDepthDeepParallaxFlipBinormal Obsolete.
Public methodSetDepthDeepParallaxFlipTangent Obsolete.
Public methodSetDepthDeepParallaxMaxLayers Obsolete.
Public methodSetDepthDeepParallaxMinLayers Obsolete.
Public methodSetDepthDrawMode Obsolete.
Public methodSetDepthScale Obsolete.
Public methodSetDetailBlendMode Obsolete.
Public methodSetDetailUv Obsolete.
Public methodSetDiffuseMode Obsolete.
Public methodSetDistanceFade Obsolete.
Public methodSetDistanceFadeMaxDistance Obsolete.
Public methodSetDistanceFadeMinDistance Obsolete.
Public methodSetEmission Obsolete.
Public methodSetEmissionEnergy Obsolete.
Public methodSetEmissionOperator Obsolete.
Public methodSetFeature Obsolete.

If true, enables the specified SpatialMaterialFeature. Many features that are available in SpatialMaterials need to be enabled before use. This way the cost for using the feature is only incurred when specified. Features can also be enabled by setting the corresponding member to true.

Public methodSetFlag Obsolete.

If true, enables the specified flag. Flags are optional behaviour that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to true. See SpatialMaterialFlags enumerator for options.

Public methodSetGrow Obsolete.
Public methodSetGrowEnabled Obsolete.
Public methodSetIndexed

Assigns a new value to the property identified by the NodePath. The node path should be relative to the current object and can use the colon character (:) to access nested properties. Example:

set_indexed("position", Vector2(42, 0))
set_indexed("position:y", -10)
print(position) # (42, -10)

(Inherited from Object.)
Public methodSetLineWidth Obsolete.
Public methodSetLocalToScene Obsolete. (Inherited from Resource.)
Public methodSetMessageTranslation

Defines whether the object can translate strings (with calls to Tr(String)). Enabled by default.

(Inherited from Object.)
Public methodSetMeta

Adds, changes or removes a given entry in the object's metadata. Metadata are serialized and can take any Variant value.

To remove a given entry from the object's metadata, use RemoveMeta(String). Metadata is also removed if its value is set to null. This means you can also use set_meta("name", null) to remove metadata for "name".

(Inherited from Object.)
Public methodSetMetallic Obsolete.
Public methodSetMetallicTextureChannel Obsolete.
Public methodSetName Obsolete. (Inherited from Resource.)
Public methodSetNextPass Obsolete. (Inherited from Material.)
Public methodSetNormalScale Obsolete.
Public methodSetParticlesAnimHFrames Obsolete.
Public methodSetParticlesAnimLoop Obsolete.
Public methodSetParticlesAnimVFrames Obsolete.
Public methodSetPath Obsolete. (Inherited from Resource.)
Public methodSetPointSize Obsolete.
Public methodSetProximityFade Obsolete.
Public methodSetProximityFadeDistance Obsolete.
Public methodSetRefraction Obsolete.
Public methodSetRefractionTextureChannel Obsolete.
Public methodSetRenderPriority Obsolete. (Inherited from Material.)
Public methodSetRim Obsolete.
Public methodSetRimTint Obsolete.
Public methodSetRoughness Obsolete.
Public methodSetRoughnessTextureChannel Obsolete.
Public methodSetScript

Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality.

If the object already had a script, the previous script instance will be freed and its variables and state will be lost. The new script's method will be called.

(Inherited from Object.)
Public methodSetSpecular Obsolete.
Public methodSetSpecularMode Obsolete.
Public methodSetSubsurfaceScatteringStrength Obsolete.
Public methodSetTexture Obsolete.

Sets the Texture to be used by the specified SpatialMaterialTextureParam. This function is called when setting members ending in *_texture.

Public methodSetTransmission Obsolete.
Public methodSetupLocalToScene

This method is called when a resource with ResourceLocalToScene enabled is loaded from a PackedScene instantiation. Its behavior can be customized by overriding _SetupLocalToScene from script.

For most resources, this method performs no base logic. ViewportTexture performs custom logic to properly set the proxy texture and flags in the local viewport.

(Inherited from Resource.)
Public methodSetUv1Offset Obsolete.
Public methodSetUv1Scale Obsolete.
Public methodSetUv1TriplanarBlendSharpness Obsolete.
Public methodSetUv2Offset Obsolete.
Public methodSetUv2Scale Obsolete.
Public methodSetUv2TriplanarBlendSharpness Obsolete.
Public methodTakeOverPath

Sets the path of the resource, potentially overriding an existing cache entry for this path. This differs from setting ResourcePath, as the latter would error out if another resource was already cached for the given path.

(Inherited from Resource.)
Public methodCode exampleToSignal
Returns a new SignalAwaiter awaiter configured to complete when the instance source emits the signal specified by the signal parameter.
(Inherited from Object.)
Public methodToString (Inherited from Object.)
Public methodTr

Translates a message using translation catalogs configured in the Project Settings.

Only works if message translation is enabled (which it is by default), otherwise it returns the message unchanged. See SetMessageTranslation(Boolean).

(Inherited from Object.)
Public methodUnreference

Decrements the internal reference counter. Use this only if you really know what you are doing.

Returns true if the decrement was successful, false otherwise.

(Inherited from Reference.)
Top
See Also