Search Results for

    Show / Hide Table of Contents

    Class Material

    Material asset that contains shader for rendering models on the GPU.

    Inheritance
    System.Object
    Object
    Asset
    BinaryAsset
    MaterialBase
    Material
    Inherited Members
    MaterialBase.GetParameter(String)
    MaterialBase.GetParameterValue(String)
    MaterialBase.SetParameterValue(String, Object, Boolean)
    MaterialBase.CreateVirtualInstance()
    MaterialBase.Parameters
    MaterialBase.Info
    MaterialBase.IsSurface
    MaterialBase.IsPostFx
    MaterialBase.IsDecal
    MaterialBase.IsGUI
    MaterialBase.IsTerrain
    MaterialBase.IsParticle
    BinaryAsset.Reimport()
    BinaryAsset.ImportPath
    Asset.Reload()
    Asset.WaitForLoaded(Double)
    Asset.GetReferences()
    Asset.Save(String)
    Asset.ToString()
    Asset.ReferencesCount
    Asset.Path
    Asset.IsLoaded
    Asset.LastLoadFailed
    Asset.IsVirtual
    Asset.ShouldDeleteFileOnUnload
    Asset.MemoryUsage
    Object.__unmanagedPtr
    Object.__internalId
    Object.Finalize()
    Object.As<T>()
    Object.NewValue(Type)
    Object.New(String)
    Object.Find<T>(Guid, Boolean)
    Object.Find(Guid, Type, Boolean)
    Object.TryFind<T>(Guid)
    Object.TryFind(Guid, Type)
    Object.Destroy(Object, Single)
    Object.DestroyNow(Object)
    Object.Destroy<T>(T, Single)
    Object.Equals(Object)
    Object.GetUnmanagedPtr(Object)
    Object.GetUnmanagedInterface(Object, Type)
    Object.FromUnmanagedPtr(IntPtr)
    Object.MapObjectID(Guid)
    Object.RemapObjectID(Guid)
    Object.GetHashCode()
    Object.ID
    Object.TypeName
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    [Unmanaged]
    public class Material : MaterialBase

    Constructors

    Material()

    Initializes a new instance of the Material.

    Declaration
    public 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.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat