/
TON618OFF
/
Unity-Project-RTU
Обзор
Документация
Войти
/
TON618OFF
/
Unity-Project-RTU
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Library/PackageCache/com.unity.visualscripting@1.9.4/Runtime/VisualScripting.Flow/Framework/Variables/UnifiedVariableUnit.cs
39 строк
1 KB
TON618OFF
release
03 окт 2024, 22:20
03 окт 2024, 22:20
7c70e9f
Код
Авторство
О чём код?
using UnityEngine; namespace Unity.VisualScripting { [SpecialUnit] public abstract class UnifiedVariableUnit : Unit, IUnifiedVariableUnit { /// <summary> /// The kind of variable. /// </summary> [Serialize, Inspectable, UnitHeaderInspectable] public VariableKind kind { get; set; } /// <summary> /// The name of the variable. /// </summary> [DoNotSerialize] [PortLabelHidden] public ValueInput name { get; private set; } /// <summary> /// The source of the variable. /// </summary> [DoNotSerialize] [PortLabelHidden] [NullMeansSelf] 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(); } } } }