Class Material
Material asset that contains shader for rendering models on the GPU.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public class Material : MaterialBase
Constructors
Material()
Methods
LoadSurface(Boolean)
Tries to load surface graph from the asset.
Declaration
[Unmanaged]
public byte[] LoadSurface(bool createDefaultIfMissing)
Parameters
System.Boolean
createDefaultIfMissing
True if create default surface if missing. |
Returns
System.Byte[]
The output surface data, or empty if failed to load. |
SaveSurface(Byte[], MaterialInfo)
Updates the material surface (save new one, discard cached data, reload asset).
Declaration
[Unmanaged]
public bool SaveSurface(byte[] data, MaterialInfo info)
Parameters
System.Byte[]
data
The surface graph data. |
MaterialInfo
info
The material info structure. |
Returns
System.Boolean
True if cannot save it, otherwise false. |