Base node for geometry based visual instances.
    public abstract class GeometryInstance : VisualInstance

Base node for geometry based visual instances. Shares some common functionality like visibility and custom materials.

Inheritance Chain

Derived Classes

Properties

    public ShadowCastingSetting CastShadow { get; set; }

The selected shadow casting flag. See SHADOW_CASTING_SETTING_* constants for values.

    public float ExtraCullMargin { get; set; }

The extra distance added to the GeometryInstance’s bounding box (AABB) to increase its cull box.

    public float LodMaxDistance { get; set; }

The GeometryInstance’s max LOD distance.

    public float LodMaxHysteresis { get; set; }

The GeometryInstance’s max LOD margin.

    public float LodMinDistance { get; set; }

The GeometryInstance’s min LOD distance.

    public float LodMinHysteresis { get; set; }

The GeometryInstance’s min LOD margin.

    public Material MaterialOverride { get; set; }

The material override for the whole geometry.

If there is a material in material_override, it will be used instead of any material set in any material slot of the mesh.

    public bool UseInBakedLight { get; set; }

If true this GeometryInstance will be used when baking lights using a GIProbe and/or any other form of baked lighting.

Methods

    public ShadowCastingSetting GetCastShadowsSetting()

Getter for CastShadow

    public float GetExtraCullMargin()

Getter for ExtraCullMargin

    public bool GetFlag(Flags flag)

    public float GetLodMaxDistance()

Getter for LodMaxDistance

    public float GetLodMaxHysteresis()

Getter for LodMaxHysteresis

    public float GetLodMinDistance()

Getter for LodMinDistance

    public float GetLodMinHysteresis()

Getter for LodMinHysteresis

    public Material GetMaterialOverride()

Getter for MaterialOverride

    public void SetCastShadowsSetting(ShadowCastingSetting shadowCastingSetting)

Setter for CastShadow

    public void SetExtraCullMargin(float margin)

Setter for ExtraCullMargin

    public void SetFlag(Flags flag, bool value)

    public void SetLodMaxDistance(float mode)

Setter for LodMaxDistance

    public void SetLodMaxHysteresis(float mode)

Setter for LodMaxHysteresis

    public void SetLodMinDistance(float mode)

Setter for LodMinDistance

    public void SetLodMinHysteresis(float mode)

Setter for LodMinHysteresis

    public void SetMaterialOverride(Material material)

Setter for MaterialOverride

Inner Types

Flags

Name Value Description
UseBakedLight 0 Will allow the GeometryInstance to be used when baking lights using a [GIProbe] and/or any other form of baked lighting.
Added documentation for GeometryInstance and VisualInstance    
Max 1  

ShadowCastingSetting

Name Value Description
Off 0 Will not cast any shadows.
On 1 Will cast shadows from all visible faces in the GeometryInstance.
Will take culling into account, so faces not being rendered will not be taken into account when shadow casting.    
DoubleSided 2 Will cast shadows from all visible faces in the GeometryInstance.
Will not take culling into account, so all faces will be taken into account when shadow casting.    
ShadowsOnly 3 Will only show the shadows casted from this object.
In other words: The actual mesh will not be visible, only the shadows casted from the mesh.    
Tags: