Maze / Library /PackageCache /com.unity.visualscripting@1.8.0 /Runtime /VisualScripting.Flow /ScriptMachine.cs
| using UnityEngine; | |
| namespace Unity.VisualScripting | |
| { | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| 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); | |
| } | |
| } | |
| [] | |
| protected override void ShowData() | |
| { | |
| base.ShowData(); | |
| } | |
| } | |
| } | |