Class VisualScriptWindow
VisualScript window allows to view and edit VisualScript asset.
Inheritance
Namespace: FlaxEditor.Windows.Assets
Assembly: FlaxEngine.CSharp.dll
Syntax
public sealed class VisualScriptWindow : AssetEditorWindowBase<VisualScript>, IComparable, IDrawable, IEditable, IContentItemOwner, IVisjectSurfaceWindow, IVisjectSurfaceOwner, ISurfaceContext, ISearchWindow
Constructors
VisualScriptWindow(Editor, VisualScriptItem)
Declaration
public VisualScriptWindow(Editor editor, VisualScriptItem item)
Parameters
Editor
editor
|
VisualScriptItem
item
|
Properties
AssetType
Gets the type of the asset for the search.
Declaration
public SearchAssetTypes AssetType { get; }
Property Value
SearchAssetTypes
|
Implements
NewParameterTypes
The new parameter types enum type to use. Null to disable adding new parameters.
Declaration
public IEnumerable<ScriptType> NewParameterTypes { get; }
Property Value
System.Collections.Generic.IEnumerable<FlaxEditor.Scripting.ScriptType>
|
Implements
ParentContext
Declaration
public VisjectSurfaceContext ParentContext { get; }
Property Value
FlaxEditor.Surface.VisjectSurfaceContext
|
Surface
Gets the Visject Surface.
Declaration
public VisualScriptSurface Surface { get; }
Property Value
FlaxEditor.Surface.VisualScriptSurface
|
SurfaceAsset
SurfaceData
Declaration
public byte[] SurfaceData { get; set; }
Property Value
System.Byte[]
|
SurfaceName
Declaration
public string SurfaceName { get; }
Property Value
System.String
|
Undo
Gets the undo history context for this window.
Declaration
public Undo Undo { get; }
Property Value
Undo
|
UseLayoutData
Gets a value indicating whether window uses custom layout data.
Declaration
public override bool UseLayoutData { get; }
Property Value
System.Boolean
|
Overrides
VisjectAsset
Gets the asset edited by the window.
Declaration
public Asset VisjectAsset { get; }
Property Value
Asset
|
Implements
VisjectSurface
Gets the Visject surface editor.
Declaration
public VisjectSurface VisjectSurface { get; }
Property Value
FlaxEditor.Surface.VisjectSurface
|
Implements
Methods
GetParameter(Int32)
Gets the asset parameter.
Declaration
public object GetParameter(int index)
Parameters
System.Int32
index
The zero-based parameter index. |
Returns
System.Object
The value. |
Implements
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
OnLayoutDeserialize()
Called when during windows layout deserialization if window has no layout data to load. Can be used to restore default UI layout.
Declaration
public override void OnLayoutDeserialize()
Overrides
OnLayoutDeserialize(XmlElement)
Called when during windows layout deserialization. Each window can use it to load custom interface data (eg. splitter position).
Declaration
public override void OnLayoutDeserialize(XmlElement node)
Parameters
System.Xml.XmlElement
node
The Xml document node. |
Overrides
OnLayoutSerialize(XmlWriter)
Called when during windows layout serialization. Each window can use it to store custom interface data (eg. splitter position).
Declaration
public override void OnLayoutSerialize(XmlWriter writer)
Parameters
System.Xml.XmlWriter
writer
The Xml writer. |
Overrides
OnParamAddUndo()
Called when parameter add undo action is performed.
Declaration
public void OnParamAddUndo()
Implements
OnParamEditAttributesUndo()
Called when parameter edit attributes undo action is performed.
Declaration
public void OnParamEditAttributesUndo()
Implements
OnParamRemoveUndo()
Called when parameter remove undo action is performed.
Declaration
public void OnParamRemoveUndo()
Implements
OnParamRenameUndo()
Called when parameter rename undo action is performed.
Declaration
public void OnParamRenameUndo()
Implements
OnPlayBegin()
Called when Editor is entering play mode.
Declaration
public override void OnPlayBegin()
Overrides
OnPlayBeginning()
Called before Editor will enter play mode.
Declaration
public override void OnPlayBeginning()
Overrides
OnPlayEnd()
Called when Editor leaves the play mode.
Declaration
public override void OnPlayEnd()
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
SetParameter(Int32, Object)
Sets the asset parameter.
Declaration
public void SetParameter(int index, object value)
Parameters
System.Int32
index
The zero-based parameter index. |
System.Object
value
The value to set. |
Implements
ShowNode(SurfaceNode)
Focuses the node.
Declaration
public void ShowNode(SurfaceNode node)
Parameters
FlaxEditor.Surface.SurfaceNode
node
The node. |
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()
Overrides
Events
SurfaceLoaded
Event called when surface gets loaded (eg. after opening the window).
Declaration
public event Action SurfaceLoaded
Event Type
System.Action
|