A game about forced loneliness, made by TACStudios
1using UnityEngine; 2 3namespace Unity.VisualScripting 4{ 5 [SpecialUnit] 6 public abstract class UnifiedVariableUnit : Unit, IUnifiedVariableUnit 7 { 8 /// <summary> 9 /// The kind of variable. 10 /// </summary> 11 [Serialize, Inspectable, UnitHeaderInspectable] 12 public VariableKind kind { get; set; } 13 14 /// <summary> 15 /// The name of the variable. 16 /// </summary> 17 [DoNotSerialize] 18 [PortLabelHidden] 19 public ValueInput name { get; private set; } 20 21 /// <summary> 22 /// The source of the variable. 23 /// </summary> 24 [DoNotSerialize] 25 [PortLabelHidden] 26 [NullMeansSelf] 27 public ValueInput @object { get; private set; } 28 29 protected override void Definition() 30 { 31 name = ValueInput(nameof(name), string.Empty); 32 33 if (kind == VariableKind.Object) 34 { 35 @object = ValueInput<GameObject>(nameof(@object), null).NullMeansSelf(); 36 } 37 } 38 } 39}