Search Results for

    Show / Hide Table of Contents

    Class VisualScript

    The Visual Script asset. Contains a graph with functions and parameters for visual scripting.

    Inheritance
    System.Object
    Object
    Asset
    BinaryAsset
    VisualScript
    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 sealed class VisualScript : BinaryAsset

    Constructors

    VisualScript()

    Initializes a new instance of the VisualScript.

    Declaration
    public VisualScript()

    Properties

    Meta

    The script metadata.

    Declaration
    [Unmanaged]
    public VisualScript.Metadata Meta { get; }
    Property Value
    VisualScript.Metadata

    Parameters

    Gets the list of Visual Script parameters declared in this graph (excluding base types).

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

    ScriptTypeName

    Gets the typename of the Visual Script. Identifies it's scripting type.

    Declaration
    [Unmanaged]
    public string ScriptTypeName { get; }
    Property Value
    System.String

    Methods

    CreateInstance()

    Creates a new instance of the Visual Script object.

    Declaration
    [Unmanaged]
    public Object CreateInstance()
    Returns
    Object

    The created instance or null if failed.

    GetMetaData(Int32)

    Gets the metadata of the script surface.

    Declaration
    [Unmanaged]
    public byte[] GetMetaData(int typeID)
    Parameters
    System.Int32 typeID

    Returns
    System.Byte[]

    GetMethodMetaData(Int32, Int32)

    Gets the metadata of the method.

    Declaration
    [Unmanaged]
    public byte[] GetMethodMetaData(int index, int typeID)
    Parameters
    System.Int32 index

    System.Int32 typeID

    Returns
    System.Byte[]

    GetMethodsCount()

    Returns the amount of methods in the script.

    Declaration
    [Unmanaged]
    public int GetMethodsCount()
    Returns
    System.Int32

    GetMethodSignature(Int32, out String, out Byte, out String, out String[], out String[], out Boolean[])

    Gets the signature data of the method.

    Declaration
    [Unmanaged]
    public void GetMethodSignature(int index, out string name, out byte flags, out string returnTypeName, out string[] paramNames, out string[] paramTypeNames, out bool[] paramOuts)
    Parameters
    System.Int32 index

    System.String name

    System.Byte flags

    System.String returnTypeName

    System.String[] paramNames

    System.String[] paramTypeNames

    System.Boolean[] paramOuts

    GetScriptInstanceParameterValue(String, Object)

    Gets the value of the Visual Script parameter of the given instance.

    Declaration
    [Unmanaged]
    public object GetScriptInstanceParameterValue(string name, Object instance)
    Parameters
    System.String name

    The parameter name.

    Object instance

    The object instance.

    Returns
    System.Object

    The property value.

    InvokeMethod(Int32, Object, Object[])

    Invokes the method.

    Declaration
    [Unmanaged]
    public object InvokeMethod(int index, object instance, object[] parameters)
    Parameters
    System.Int32 index

    System.Object instance

    System.Object[] parameters

    Returns
    System.Object

    LoadSurface()

    Tries to load surface graph from the asset.

    Declaration
    [Unmanaged]
    public byte[] LoadSurface()
    Returns
    System.Byte[]

    The surface data or empty if failed to load it.

    SaveSurface(Byte[], ref VisualScript.Metadata)

    Updates the graph surface (save new one, discard cached data, reload asset).

    Declaration
    [Unmanaged]
    public bool SaveSurface(byte[] data, ref VisualScript.Metadata meta)
    Parameters
    System.Byte[] data

    Stream with graph data.

    VisualScript.Metadata meta

    Script metadata.

    Returns
    System.Boolean

    True if cannot save it, otherwise false.

    SetScriptInstanceParameterValue(String, Object, Object)

    Sets the value of the Visual Script parameter of the given instance.

    Declaration
    [Unmanaged]
    public void SetScriptInstanceParameterValue(string name, Object instance, object value)
    Parameters
    System.String name

    The parameter name.

    Object instance

    The object instance.

    System.Object value

    The property value to set.

    Extension Methods

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

    See Also

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