docs.unity.cn
    Show / Hide Table of Contents

    Class SystemGraphComponent

    Main monobehaviour component for sytem graph

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    SystemGraphComponent
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(String, Single)
    MonoBehaviour.InvokeRepeating(String, Single, Single)
    MonoBehaviour.CancelInvoke(String)
    MonoBehaviour.IsInvoking(String)
    MonoBehaviour.StartCoroutine(String)
    MonoBehaviour.StartCoroutine(String, Object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(String)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(Object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, Component)
    Component.TryGetComponent<T>(T)
    Component.GetComponent(String)
    Component.GetComponentInChildren(Type, Boolean)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(Boolean)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, Boolean)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(Boolean)
    Component.GetComponentsInChildren<T>(Boolean, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, Boolean)
    Component.GetComponentInParent(Type)
    UnityEngine.Component.GetComponentInParent<T>(System.Boolean)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, Boolean)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(Boolean)
    Component.GetComponentsInParent<T>(Boolean, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(String)
    Component.SendMessageUpwards(String, Object, SendMessageOptions)
    Component.SendMessageUpwards(String, Object)
    Component.SendMessageUpwards(String)
    Component.SendMessageUpwards(String, SendMessageOptions)
    Component.SendMessage(String, Object)
    Component.SendMessage(String)
    Component.SendMessage(String, Object, SendMessageOptions)
    Component.SendMessage(String, SendMessageOptions)
    Component.BroadcastMessage(String, Object, SendMessageOptions)
    Component.BroadcastMessage(String, Object)
    Component.BroadcastMessage(String)
    Component.BroadcastMessage(String, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Component.rigidbody
    Component.rigidbody2D
    Component.camera
    Component.light
    Component.animation
    Component.constantForce
    Component.renderer
    Component.audio
    Component.networkView
    Component.collider
    Component.collider2D
    Component.hingeJoint
    Component.particleSystem
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, Boolean)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    UnityEngine.Object.FindObjectsOfType<T>(System.Boolean)
    Object.FindObjectOfType<T>()
    UnityEngine.Object.FindObjectOfType<T>(System.Boolean)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindObjectOfType(Type, Boolean)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: Mechatronics.SystemGraph
    Syntax
    [ExecuteInEditMode]
    [Serializable]
    [HelpURL("https://docs.unity.cn/Packages/com.unity.systemgraph@2.0/manual/Architecture.html")]
    public class SystemGraphComponent : MonoBehaviour

    Constructors

    SystemGraphComponent()

    Initializes a new instance of the SystemGraphComponent class.

    Declaration
    public SystemGraphComponent()

    Fields

    _bindingsFoldOut

    The bindings fold out for Inspector

    Declaration
    [SerializeField]
    public bool _bindingsFoldOut
    Field Value
    Type Description
    Boolean

    _graphReference

    The graph reference used as an asset

    Declaration
    [SerializeField]
    public SystemGraphObject _graphReference
    Field Value
    Type Description
    SystemGraphObject

    _propertiesFoldOut

    The properties fold out for Inspector

    Declaration
    [SerializeField]
    public bool _propertiesFoldOut
    Field Value
    Type Description
    Boolean

    Properties

    ComponentManager

    Contains data on all used properties and bindings for the current graph instance.

    Declaration
    public SystemComponentManager ComponentManager { get; }
    Property Value
    Type Description
    SystemComponentManager

    The component manager.

    DiagnosticsLog

    Diagnostics Log

    Declaration
    public List<string> DiagnosticsLog { get; }
    Property Value
    Type Description
    List<String>

    The diagnostics log.

    ErrorsInTraceLog

    Returns the state of errors in diagnostics log

    Declaration
    public bool ErrorsInTraceLog { get; }
    Property Value
    Type Description
    Boolean

    true if [errors in trace log]; otherwise, false.

    GraphDescriptor

    Descriptor that contains information about the current graph and all subgraphs.

    Declaration
    public SystemGraphManager.GraphDescriptor GraphDescriptor { get; }
    Property Value
    Type Description
    SystemGraphManager.GraphDescriptor

    The graph descriptor.

    GraphObject

    The current runtime graph asset being used.

    Declaration
    public SystemGraphObject GraphObject { get; set; }
    Property Value
    Type Description
    SystemGraphObject

    The graph object.

    GraphObjectReference

    Reference graph asset, this asset reference is copied and used for runtime. Any changes to this asset will not take place in the graph until a new Update(), upon which this component will replace the current runtime asset with the updated reference.

    Declaration
    public SystemGraphObject GraphObjectReference { get; set; }
    Property Value
    Type Description
    SystemGraphObject

    The graph object reference.

    InstanceGuid

    GUID unique to every instance of SystemGraphComponent in the scene.

    Declaration
    public string InstanceGuid { get; }
    Property Value
    Type Description
    String

    The instance unique identifier.

    Linker

    Gets the linker.

    Declaration
    public Linker Linker { get; }
    Property Value
    Type Description
    Linker

    The linker.

    LinkResult

    Gets the link result.

    Declaration
    public Linker.LinkerResult LinkResult { get; }
    Property Value
    Type Description
    Linker.LinkerResult

    The link result.

    Scheduler

    Gets the scheduler.

    Declaration
    public Scheduler Scheduler { get; }
    Property Value
    Type Description
    Scheduler

    The scheduler.

    Upgrading

    Indicator for when the SystemGraph is undergoing an upgrade.

    Declaration
    public bool Upgrading { get; set; }
    Property Value
    Type Description
    Boolean

    true if upgrading; otherwise, false.

    Methods

    Awake()

    Awake and assign new guid if necessary.

    Declaration
    public void Awake()

    ClearDiagnosticsLog()

    Clear Diagnostics Log

    Declaration
    public void ClearDiagnosticsLog()

    ClearPendingGraphAssets()

    Remove all pending graphs in the stack.

    Declaration
    public static void ClearPendingGraphAssets()

    CreateRuntimeDescriptor(Boolean)

    Creates all nodes and binds properties to nodes.

    Declaration
    public void CreateRuntimeDescriptor(bool forceRefresh = false)
    Parameters
    Type Name Description
    Boolean forceRefresh

    Does nothing? for now.

    ForceValidate()

    Check for reference asset diverging from current runtime asset, if so then update runtime asset.

    Declaration
    public void ForceValidate()

    GetAllNodeRuntime()

    Get a map of NodeGuid -> NodeDescriptor.

    Declaration
    public Dictionary<string, Linker.NodeReferenceDescriptor> GetAllNodeRuntime()
    Returns
    Type Description
    Dictionary<String, Linker.NodeReferenceDescriptor>

    Map of NodeGuid -> NodeDescriptor.

    GetBinding<T>(String)

    This method can be used to retrieve the binding object by LynX path.

    Declaration
    public Binding<T> GetBinding<T>(string queryPath)
    Parameters
    Type Name Description
    String queryPath

    LynX path of the binding

    Returns
    Type Description
    Binding<T>

    The binding of type binding{T} if queryPath exists, null otherwise.

    Type Parameters
    Name Description
    T

    Type of the binding

    GetBindingValue<T>(String, out T)

    This method can be used to get the binding value.

    Declaration
    public bool GetBindingValue<T>(string queryPath, out T data)
    Parameters
    Type Name Description
    String queryPath

    LynX query path of the binding

    T data

    Data is written to this ref

    Returns
    Type Description
    Boolean

    True if value was fetched successfully.

    Type Parameters
    Name Description
    T

    Type of the binding

    GetComponentAttachments()

    Get all the components used by this SystemGraphComponent. Components include properties and bindings.

    Declaration
    public ReadOnlyDictionary<string, IComponentAttachment> GetComponentAttachments()
    Returns
    Type Description
    ReadOnlyDictionary<String, IComponentAttachment>

    A map of Property/Binding name -> Monobehaviour component for all properties and bindings.

    GetNodeRuntime(String)

    Find node in the current runtime asset by guid.

    Declaration
    public NodeRuntime GetNodeRuntime(string guid)
    Parameters
    Type Name Description
    String guid

    Guid to search for.

    Returns
    Type Description
    NodeRuntime

    The appropriate NodeRuntime.

    GetProperty<T>(String)

    This method can be used to retrieve the property object by name.

    Declaration
    public Property<T> GetProperty<T>(string propName)
    Parameters
    Type Name Description
    String propName

    Name of the property

    Returns
    Type Description
    Property<T>

    The property of type Property{T} if propName exists, null otherwise.

    Type Parameters
    Name Description
    T

    Type of the property

    GetPropertyValue<T>(String, out T)

    This method can be used to get the property value.

    Declaration
    public bool GetPropertyValue<T>(string propName, out T data)
    Parameters
    Type Name Description
    String propName

    Name of the property

    T data

    Data is written to this ref

    Returns
    Type Description
    Boolean

    True if value was fetched successfully.

    Type Parameters
    Name Description
    T

    Type of the property

    Log(String)

    General debug log. See LogError().

    Declaration
    public void Log(string msg)
    Parameters
    Type Name Description
    String msg

    Message to log.

    LogError(String)

    Appends the graph name to the start of msg and logs error to console.

    Declaration
    public void LogError(string msg)
    Parameters
    Type Name Description
    String msg

    Message to log.

    LogWarning(String)

    Logs warning, see LogError()

    Declaration
    public void LogWarning(string msg)
    Parameters
    Type Name Description
    String msg

    Message to log.

    OnDestroy()

    Deregister this component from the manager of all system graphs.

    Declaration
    public void OnDestroy()

    PushGraphAsset(SystemGraphComponent.PendingGraphDescriptor)

    Add graph to the reference graph stack.

    Declaration
    public static void PushGraphAsset(SystemGraphComponent.PendingGraphDescriptor pendingGraphDesc)
    Parameters
    Type Name Description
    SystemGraphComponent.PendingGraphDescriptor pendingGraphDesc

    See PendingGraphDescriptor.

    RefreshRuntimeParameters(Boolean, Boolean, Boolean)

    Checks the current graph runtime graph asset against the reference graph asset. If the reference asset has changed, then updates the current runtime asset to match the reference asset. Then, Updates parameters and bindings to match the (possible) new asset.

    Declaration
    public void RefreshRuntimeParameters(bool forceRefreshGraph = false, bool forceRefreshComponents = false, bool preventComponentDeletion = false)
    Parameters
    Type Name Description
    Boolean forceRefreshGraph

    Refresh the graph even if the reference asset hasn't changed.

    Boolean forceRefreshComponents

    Refresh components, even if nothing is outdated.

    Boolean preventComponentDeletion

    Do not delete any components when refreshing.

    SetBindingValue<T>(String, T)

    This method can be used to set the binding value.

    Declaration
    public bool SetBindingValue<T>(string queryPath, T value)
    Parameters
    Type Name Description
    String queryPath

    LynX path of the binding

    T value

    Value to set

    Returns
    Type Description
    Boolean

    The value of type Binding{T} if queryPath exists, null otherwise.

    Type Parameters
    Name Description
    T

    Type of the binding

    SetPropertyValue<T>(String, T)

    This method can be used to set the property value.

    Declaration
    public bool SetPropertyValue<T>(string propName, T value)
    Parameters
    Type Name Description
    String propName

    Name of the property

    T value

    Value to set

    Returns
    Type Description
    Boolean

    The property of type Property{T} if propName exists, null otherwise.

    Type Parameters
    Name Description
    T

    Type of the property

    Start()

    Starts this instance.

    Declaration
    public void Start()
    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, October 18, 2022
    Terms of use