Singularity/Library/PackageCache/com.unity.visualscripting@1.../Runtime/VisualScripting.Flow/Framework/Graph/HasScriptGraph.cs
2024-05-06 11:45:45 -07:00

21 lines
692 B
C#

using JetBrains.Annotations;
namespace Unity.VisualScripting
{
/// <summary>
/// Check if a GameObject or ScriptMachine has a ScriptGraph
/// </summary>
[TypeIcon(typeof(FlowGraph))]
[UnitCategory("Graphs/Graph Nodes")]
public sealed class HasScriptGraph : HasGraph<FlowGraph, ScriptGraphAsset, ScriptMachine>
{
/// <summary>
/// The type of object that handles the graph.
/// </summary>
[Serialize, Inspectable, UnitHeaderInspectable, UsedImplicitly]
public ScriptGraphContainerType containerType { get; set; }
protected override bool isGameObject => containerType == ScriptGraphContainerType.GameObject;
}
}