Search Results for

    Show / Hide Table of Contents

    Class MaterialBase

    Base class for Material and MaterialInstance.

    Inheritance
    System.Object
    Object
    Asset
    BinaryAsset
    MaterialBase
    Material
    MaterialInstance
    Inherited Members
    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 abstract class MaterialBase : BinaryAsset

    Constructors

    MaterialBase()

    Initializes a new instance of the MaterialBase.

    Declaration
    protected MaterialBase()

    Properties

    Info

    Gets the material info, structure which describes material surface.

    Declaration
    [Unmanaged]
    public MaterialInfo Info { get; }
    Property Value
    MaterialInfo

    IsDecal

    Gets a value indicating whether this material is decal (cannot be used with a normal meshes).

    Declaration
    public bool IsDecal { get; }
    Property Value
    System.Boolean

    IsGUI

    Gets a value indicating whether this material is a GUI shader (cannot be used with a normal meshes).

    Declaration
    public bool IsGUI { get; }
    Property Value
    System.Boolean

    IsParticle

    Gets a value indicating whether this material is a particle shader (cannot be used with a normal meshes).

    Declaration
    public bool IsParticle { get; }
    Property Value
    System.Boolean

    IsPostFx

    Gets a value indicating whether this material is post fx (cannot be used with a normal meshes).

    Declaration
    public bool IsPostFx { get; }
    Property Value
    System.Boolean

    IsSurface

    Gets a value indicating whether this material is a surface shader (can be used with a normal meshes).

    Declaration
    public bool IsSurface { get; }
    Property Value
    System.Boolean

    IsTerrain

    Gets a value indicating whether this material is a terrain shader (cannot be used with a normal meshes).

    Declaration
    public bool IsTerrain { get; }
    Property Value
    System.Boolean

    Parameters

    Gets the material parameters collection.

    Declaration
    [Unmanaged]
    public MaterialParameter[] Parameters { get; }
    Property Value
    MaterialParameter[]

    Methods

    CreateVirtualInstance()

    Creates the virtual material instance of this material which allows to override any material parameters.

    Declaration
    [Unmanaged]
    public MaterialInstance CreateVirtualInstance()
    Returns
    MaterialInstance

    The created virtual material instance asset.

    GetParameter(String)

    Gets the material parameter.

    Declaration
    [Unmanaged]
    public MaterialParameter GetParameter(string name)
    Parameters
    System.String name

    Returns
    MaterialParameter

    GetParameterValue(String)

    Gets the material parameter value.

    Declaration
    [Unmanaged]
    public object GetParameterValue(string name)
    Parameters
    System.String name

    Returns
    System.Object

    The parameter value.

    SetParameterValue(String, Object, Boolean)

    Sets the material parameter value (and sets IsOverride to true).

    Declaration
    [Unmanaged]
    public void SetParameterValue(string name, object value, bool warnIfMissing = true)
    Parameters
    System.String name

    The parameter name.

    System.Object value

    The value to set.

    System.Boolean warnIfMissing

    True to warn if parameter is missing, otherwise will do nothing.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.RawClone<T>(T)

    See Also

    BinaryAsset
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat