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

123456789101112131415161718192021222324252627282930
  1. namespace Unity.VisualScripting
  2. {
  3. /// <summary>
  4. /// Stops the execution of the current loop.
  5. /// </summary>
  6. [UnitTitle("Break Loop")]
  7. [UnitCategory("Control")]
  8. [UnitOrder(13)]
  9. public class Break : Unit
  10. {
  11. /// <summary>
  12. /// The entry point for the break.
  13. /// </summary>
  14. [DoNotSerialize]
  15. [PortLabelHidden]
  16. public ControlInput enter { get; private set; }
  17. protected override void Definition()
  18. {
  19. enter = ControlInput(nameof(enter), Operation);
  20. }
  21. public ControlOutput Operation(Flow flow)
  22. {
  23. flow.BreakLoop();
  24. return null;
  25. }
  26. }
  27. }