Class MaterialInstance
Instance of the Material with custom set of material parameter values.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public class MaterialInstance : MaterialBase
Constructors
MaterialInstance()
Properties
BaseMaterial
Gets or sets the base material. If value gets changed parameters collection is restored to the default values of the new material.
Declaration
[Unmanaged]
public MaterialBase BaseMaterial { get; set; }
Property Value
MaterialBase
|
Methods
ResetParameters()
Resets all parameters back to the base material (including disabling parameter overrides).
Declaration
[Unmanaged]
public void ResetParameters()
Save(String)
Saves this asset to the file. Supported only in Editor.
Declaration
[Unmanaged]
public bool Save(string path = null)
Parameters
System.String
path
The custom asset path to use for the saving. Use empty value to save this asset to its own storage location. Can be used to duplicate asset. Must be specified when saving virtual asset. |
Returns
System.Boolean
True if cannot save data, otherwise false. |
Remarks
If you use saving with the GPU mesh data then the call has to be provided from the thread other than the main game thread.