Maze / Library /PackageCache /com.unity.visualscripting@1.8.0 /Runtime /VisualScripting.Flow /Framework /Variables /UnifiedVariableUnit.cs
| using UnityEngine; | |
| namespace Unity.VisualScripting | |
| { | |
| [] | |
| public abstract class UnifiedVariableUnit : Unit, IUnifiedVariableUnit | |
| { | |
| /// <summary> | |
| /// The kind of variable. | |
| /// </summary> | |
| [] | |
| public VariableKind kind { get; set; } | |
| /// <summary> | |
| /// The name of the variable. | |
| /// </summary> | |
| [] | |
| [] | |
| public ValueInput name { get; private set; } | |
| /// <summary> | |
| /// The source of the variable. | |
| /// </summary> | |
| [] | |
| [] | |
| [] | |
| public ValueInput @object { get; private set; } | |
| protected override void Definition() | |
| { | |
| name = ValueInput(nameof(name), string.Empty); | |
| if (kind == VariableKind.Object) | |
| { | |
| @object = ValueInput<GameObject>(nameof(@object), null).NullMeansSelf(); | |
| } | |
| } | |
| } | |
| } | |