Class MaterialWindow
Material window allows to view and edit Material asset.
Inheritance
Namespace: FlaxEditor.Windows.Assets
Assembly: FlaxEngine.CSharp.dll
Syntax
public sealed class MaterialWindow : VisjectSurfaceWindow<Material, MaterialSurface, MaterialPreview>, IComparable, IDrawable, IEditable, IContentItemOwner, IVisjectSurfaceWindow, IVisjectSurfaceOwner, ISurfaceContext, ISearchWindow
Constructors
MaterialWindow(Editor, AssetItem)
Declaration
public MaterialWindow(Editor editor, AssetItem item)
Parameters
Editor
editor
|
FlaxEditor.Content.AssetItem
item
|
Properties
AssetType
Gets the type of the asset for the search.
Declaration
public SearchAssetTypes AssetType { get; }
Property Value
SearchAssetTypes
|
Implements
CanEditSurfaceOnAssetLoadError
Gets a value indicating whether this window can edit asset surface on asset load error (eg. to fix asset loading issue due to graph problem).
Declaration
protected override bool CanEditSurfaceOnAssetLoadError { get; }
Property Value
System.Boolean
|
Overrides
NewParameterTypes
The new parameter types enum type to use. Null to disable adding new parameters.
Declaration
public override IEnumerable<ScriptType> NewParameterTypes { get; }
Property Value
System.Collections.Generic.IEnumerable<FlaxEditor.Scripting.ScriptType>
|
Overrides
SurfaceData
Declaration
public override byte[] SurfaceData { get; set; }
Property Value
System.Byte[]
|
Overrides
SurfaceName
Declaration
public override string SurfaceName { get; }
Property Value
System.String
|
Overrides
Methods
FillMaterialInfo(out MaterialInfo)
Gets material info from UI.
Declaration
public void FillMaterialInfo(out MaterialInfo info)
Parameters
MaterialInfo
info
Output info. |
LoadSurface()
Loads the surface from the asset. Called during Update(Single) when asset is loaded and surface is missing.
Declaration
protected override bool LoadSurface()
Returns
System.Boolean
True if failed, otherwise false. |
Overrides
OnAssetLinked()
Called when asset gets linked and window can setup UI for it.
Declaration
protected override void OnAssetLinked()
Overrides
OnPropertyEdited()
Called when the asset properties proxy object gets edited.
Declaration
protected override void OnPropertyEdited()
Overrides
OnSurfaceEditingStart()
Called when surface gets loaded and user can edit it.
Declaration
protected override void OnSurfaceEditingStart()
Overrides
SaveSurface()
Saves the surface to the asset. Called during Update(Single) when asset is loaded and surface is missing.
Declaration
protected override bool SaveSurface()
Returns
System.Boolean
True if failed, otherwise false. |
Overrides
SaveToOriginal()
Saves the copy of the asset to the original location. This action cannot be undone!
Declaration
protected override bool SaveToOriginal()
Returns
System.Boolean
True if failed, otherwise false. |
Overrides
SetParameter(Int32, Object)
Sets the asset parameter.
Declaration
public override void SetParameter(int index, object value)
Parameters
System.Int32
index
The zero-based parameter index. |
System.Object
value
The value to set. |
Overrides
UnlinkItem()
Unlinks the item. Removes reference to it and unbinds all events.
Declaration
protected override void UnlinkItem()