/
TON618OFF
/
Unity-Project-RTU
Обзор
Документация
Войти
/
TON618OFF
/
Unity-Project-RTU
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Library/PackageCache/com.unity.visualscripting@1.9.4/Runtime/VisualScripting.Flow/ScriptMachine.cs
64 строки
1 KB
TON618OFF
release
03 окт 2024, 22:20
03 окт 2024, 22:20
7c70e9f
Код
Авторство
О чём код?
using UnityEngine; namespace Unity.VisualScripting { [AddComponentMenu("Visual Scripting/Script Machine")] [RequireComponent(typeof(Variables))] [DisableAnnotation] [RenamedFrom("Bolt.FlowMachine")] [RenamedFrom("Unity.VisualScripting.FlowMachine")] [VisualScriptingHelpURL(typeof(ScriptMachine))] public sealed class ScriptMachine : EventMachine<FlowGraph, ScriptGraphAsset> { public override FlowGraph DefaultGraph() { return FlowGraph.WithStartUpdate(); } protected override void OnEnable() { if (hasGraph) { graph.StartListening(reference); } base.OnEnable(); } protected override void OnInstantiateWhileEnabled() { if (hasGraph) { graph.StartListening(reference); } base.OnInstantiateWhileEnabled(); } protected override void OnUninstantiateWhileEnabled() { base.OnUninstantiateWhileEnabled(); if (hasGraph) { graph.StopListening(reference); } } protected override void OnDisable() { base.OnDisable(); if (hasGraph) { graph.StopListening(reference); } } [ContextMenu("Show Data...")] protected override void ShowData() { base.ShowData(); } } }