暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

HasStateGraph.cs 720B

12345678910111213141516171819202122
  1. using System;
  2. using JetBrains.Annotations;
  3. using UnityEngine;
  4. namespace Unity.VisualScripting
  5. {
  6. /// <summary>
  7. /// Check if a GameObject or StateMachine has a StateGraph
  8. /// </summary>
  9. [TypeIcon(typeof(StateGraph))]
  10. [UnitCategory("Graphs/Graph Nodes")]
  11. public sealed class HasStateGraph : HasGraph<StateGraph, StateGraphAsset, StateMachine>
  12. {
  13. /// <summary>
  14. /// The type of object that handles the graph.
  15. /// </summary>
  16. [Serialize, Inspectable, UnitHeaderInspectable, UsedImplicitly]
  17. public StateGraphContainerType containerType { get; set; }
  18. protected override bool isGameObject => containerType == StateGraphContainerType.GameObject;
  19. }
  20. }