Class ModelBase
Base class for asset types that can contain a model resource.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public abstract class ModelBase : BinaryAsset
Constructors
ModelBase()
Properties
MaterialSlots
The list of material slots.
Declaration
[Unmanaged]
public MaterialSlot[] MaterialSlots { get; }
Property Value
MaterialSlot[]
|
MaterialSlotsCount
Gets the amount of the material slots used by this model asset.
Declaration
[Unmanaged]
public int MaterialSlotsCount { get; }
Property Value
System.Int32
|
MinScreenSize
The minimum screen size to draw this model (the bottom limit). Used to cull small models. Set to 0 to disable this feature.
Declaration
[Unmanaged]
public float MinScreenSize { get; set; }
Property Value
System.Single
|
Methods
GetSlot(String)
Gets the material slot by the name.
Declaration
[Unmanaged]
public MaterialSlot GetSlot(string name)
Parameters
System.String
name
The slot name. |
Returns
MaterialSlot
The material slot with the given name or null if cannot find it (asset may be not loaded yet). |
SetupMaterialSlots(Int32)
Resizes the material slots collection. Updates meshes that were using removed slots.
Declaration
[Unmanaged]
public virtual void SetupMaterialSlots(int slotsCount)
Parameters
System.Int32
slotsCount
|