docs.unity.cn
    Show / Hide Table of Contents

    Class LynX

    LynX is a query system to introspect SystemGraph assets easily and recursively

    Inheritance
    Object
    LynX
    Namespace: Mechatronics.SystemGraph
    Syntax
    public static class LynX

    Fields

    BindingQueryFormat

    Default Binding query format

    Declaration
    public static readonly LynX.QueryFormat BindingQueryFormat
    Field Value
    Type Description
    LynX.QueryFormat

    kBindingName

    The constant binding name format character

    Declaration
    public static readonly string kBindingName
    Field Value
    Type Description
    String

    kEdge

    The constant edge format character

    Declaration
    public static readonly string kEdge
    Field Value
    Type Description
    String

    kEdgeFollower

    The constant edge follower format character

    Declaration
    public static readonly string kEdgeFollower
    Field Value
    Type Description
    String

    kGraphDatabaseGuid

    The constant graph database unique identifier format character

    Declaration
    public static readonly string kGraphDatabaseGuid
    Field Value
    Type Description
    String

    kGraphInstanceId

    The constant graph instance identifier format character

    Declaration
    public static readonly string kGraphInstanceId
    Field Value
    Type Description
    String

    kGraphName

    The constant graph name format character

    Declaration
    public static readonly string kGraphName
    Field Value
    Type Description
    String

    kGraphNodeGuid

    The constant graph node unique identifier format character

    Declaration
    public static readonly string kGraphNodeGuid
    Field Value
    Type Description
    String

    kGraphNodeIndex

    The constant graph node index format character

    Declaration
    public static readonly string kGraphNodeIndex
    Field Value
    Type Description
    String

    kGraphNodeIndexCreate

    The constant graph node index create format character

    Declaration
    public static readonly string kGraphNodeIndexCreate
    Field Value
    Type Description
    String

    kLimitQueryCache

    Limit count of instances in the query cache

    Declaration
    public static uint kLimitQueryCache
    Field Value
    Type Description
    UInt32

    kNodeGuid

    The constant node unique identifier format character

    Declaration
    public static readonly string kNodeGuid
    Field Value
    Type Description
    String

    kNodeIndex

    The constant node index format character

    Declaration
    public static readonly string kNodeIndex
    Field Value
    Type Description
    String

    kParameterGuid

    The constant parameter unique identifier format character

    Declaration
    public static readonly string kParameterGuid
    Field Value
    Type Description
    String

    kParameterIndex

    The constant parameter index format character

    Declaration
    public static readonly string kParameterIndex
    Field Value
    Type Description
    String

    kParameterName

    The constant parameter name format character

    Declaration
    public static readonly string kParameterName
    Field Value
    Type Description
    String

    kSep

    Separator between fields of a query string

    Declaration
    public static char kSep
    Field Value
    Type Description
    Char

    mapGraphObject

    Graph Object Local cache entries

    Declaration
    public static Dictionary<string, LynX.GraphCacheDescriptor> mapGraphObject
    Field Value
    Type Description
    Dictionary<String, LynX.GraphCacheDescriptor>

    Methods

    ConvertQuery(String, LynX.QueryFormat)

    Convert the query to a new format

    Declaration
    public static string ConvertQuery(string query, LynX.QueryFormat newFormat)
    Parameters
    Type Name Description
    String query

    Main query to convert

    LynX.QueryFormat newFormat

    Format to convert to

    Returns
    Type Description
    String

    Query converted

    Get<T>(String)

    Get data from a query path string Query format: g:[graphName] (graphName is the file part of the filename) gi:[InstanceID] (Find graph asset from instanceID, can only find object instance, NOT the asset itself, always use the runtime graph instanceid here) gg:[graphDatabaseGUID] (Graph from the AssetDatabase GUID) gn:[graphNodeGUID] (The graph asset is deduced from a graph node) gni:[index] (Search graph node by index of creation in the asset, the function returns null when not found) gnic:[index] (Search graph node by index of creation in the asset in subgraph create new instance mode, the function returns null when not found) ng:[NodeGUID] (NodeGUID of SerializeNode) ni:[NodeIndex] (Retrieve Node by Index) e:[SrcPortName+DstPortName] (Retrieve edge) ef:[SrcPortName+DstPortName] (Retrieve edge, sNode points to connected node) pg:[ParameterGUID] (Retrieve Parameter by GUID) pn:[ParameterName] (Retrieve Parameter by Name) pi:[ParameterIndex] (Retrieve Parameter by Index) bn:[BindingName] (Retrieve the Binding name)

    Declaration
    public static T Get<T>(string queryPath)
        where T : class
    Parameters
    Type Name Description
    String queryPath

    The query path.

    Returns
    Type Description
    T

    Query result, related to type T

    Type Parameters
    Name Description
    T

    Type to extract from the query result

    Get<T>(String[])

    Get data from a query path array

    Declaration
    public static T Get<T>(string[] path)
        where T : class
    Parameters
    Type Name Description
    String[] path

    Main query path

    Returns
    Type Description
    T

    Query result, related to type T

    Type Parameters
    Name Description
    T

    Type to extract from the query result

    InvalidateAll()

    Clear the cache

    Declaration
    public static void InvalidateAll()

    SignalAssetChange(SystemGraphObject)

    Signal Asset Change to invalid cache

    Declaration
    public static void SignalAssetChange(SystemGraphObject graph)
    Parameters
    Type Name Description
    SystemGraphObject graph

    The graph.

    SubQuery(String, Int32, Int32)

    Extract a sub query from the main query string using from/to indexing

    Declaration
    public static string SubQuery(string query, int fromIndex, int toIndex = -1)
    Parameters
    Type Name Description
    String query

    Main query to extract from

    Int32 fromIndex

    Sub query index to start extracting (inclusive)

    Int32 toIndex

    Sub query index to stop extracting (inclusive)

    Returns
    Type Description
    String

    SubQuery extract

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, October 18, 2022
    Terms of use