Class VisjectFunctionSurfaceWindow<TAsset, TSurface>
The base class for editor windows that use FlaxEditor.Surface.VisjectSurface for content editing by graph functions (eg. material functions, particle emitter functions).
Inheritance
Namespace: FlaxEditor.Windows.Assets
Assembly: FlaxEngine.CSharp.dll
Syntax
public abstract class VisjectFunctionSurfaceWindow<TAsset, TSurface> : ClonedAssetEditorWindowBase<TAsset>, IComparable, IDrawable, IEditable, IContentItemOwner, IVisjectSurfaceOwner, ISurfaceContext where TAsset : Asset where TSurface : VisjectSurface
Type Parameters
TAsset
|
TSurface
|
Constructors
VisjectFunctionSurfaceWindow(Editor, AssetItem)
Declaration
protected VisjectFunctionSurfaceWindow(Editor editor, AssetItem item)
Parameters
Editor
editor
|
FlaxEditor.Content.AssetItem
item
|
Fields
_isWaitingForSurfaceLoad
True if window is waiting for asset load to load surface.
Declaration
protected bool _isWaitingForSurfaceLoad
Field Value
System.Boolean
|
_panel
_redoButton
Redo button.
Declaration
protected ToolStripButton _redoButton
Field Value
FlaxEditor.GUI.ToolStripButton
|
_saveButton
Save button.
Declaration
protected ToolStripButton _saveButton
Field Value
FlaxEditor.GUI.ToolStripButton
|
_surface
The surface.
Declaration
protected TSurface _surface
Field Value
TSurface
|
_tmpAssetIsDirty
True if temporary asset is dirty, otherwise false.
Declaration
protected bool _tmpAssetIsDirty
Field Value
System.Boolean
|
_undo
_undoButton
Undo button.
Declaration
protected ToolStripButton _undoButton
Field Value
FlaxEditor.GUI.ToolStripButton
|
Properties
ParentContext
Declaration
public VisjectSurfaceContext ParentContext { get; }
Property Value
FlaxEditor.Surface.VisjectSurfaceContext
|
Surface
Gets the Visject Surface.
Declaration
public TSurface Surface { get; }
Property Value
TSurface
|
SurfaceAsset
SurfaceData
Declaration
public abstract byte[] SurfaceData { get; set; }
Property Value
System.Byte[]
|
SurfaceName
Declaration
public abstract string SurfaceName { get; }
Property Value
System.String
|
Undo
Gets the undo history context for this window.
Declaration
public Undo Undo { get; }
Property Value
Undo
|
Methods
LoadSurface()
Loads the surface from the asset. Called during Update(Single) when asset is loaded and surface is missing.
Declaration
protected virtual bool LoadSurface()
Returns
System.Boolean
True if failed, otherwise false. |
OnAssetLinked()
Called when asset gets linked and window can setup UI for it.
Declaration
protected override void OnAssetLinked()
Overrides
OnContextCreated(VisjectSurfaceContext)
Declaration
public void OnContextCreated(VisjectSurfaceContext context)
Parameters
FlaxEditor.Surface.VisjectSurfaceContext
context
|
OnDestroy()
Method called when managed instance should be destroyed
Declaration
public override void OnDestroy()
Overrides
OnSurfaceClose()
Declaration
public void OnSurfaceClose()
OnSurfaceEditedChanged()
Declaration
public void OnSurfaceEditedChanged()
OnSurfaceGraphEdited()
Declaration
public void OnSurfaceGraphEdited()
RefreshTempAsset()
Refreshes temporary asset to see changes live when editing the surface.
Declaration
public bool RefreshTempAsset()
Returns
System.Boolean
True if cannot refresh it, otherwise false. |
Save()
Tries to save asset changes if it has been edited.
Declaration
public override void Save()
Overrides
SaveSurface()
Saves the surface to the asset. Called during Update(Single) when asset is loaded and surface is missing.
Declaration
protected virtual bool SaveSurface()
Returns
System.Boolean
True if failed, otherwise false. |
ShowWholeGraph()
Shows the whole surface graph.
Declaration
public void ShowWholeGraph()
UnlinkItem()
Unlinks the item. Removes reference to it and unbinds all events.
Declaration
protected override void UnlinkItem()
Overrides
Update(Single)
Perform control update and all its children
Declaration
public override void Update(float deltaTime)
Parameters
System.Single
deltaTime
Delta time in seconds |
Overrides
UpdateToolstrip()
Updates the toolstrip buttons and other controls. Called after some window events.
Declaration
protected override void UpdateToolstrip()