protected override void OnGraphEnable() { if (GetNode <TerrainOutput>() == null) { AddNode(NodeReflection.Instantiate <TerrainOutput>()); } }
protected override void OnGraphEnable() { base.OnGraphEnable(); if (GetNode <StartDialog>() == null) { var start = NodeReflection.Instantiate <StartDialog>(); AddNode(start); } if (GetNode <EndDialog>() == null) { var end = NodeReflection.Instantiate <EndDialog>(); end.Position = new Vector2(300, 0); AddNode(end); } }
/// <summary> /// On asset creation in the editor, initialize with some default event nodes. /// </summary> protected override void OnGraphEnable() { if (Nodes.Count > 0) { return; } if (GetNode <OnEnable>() == null) { var node = NodeReflection.Instantiate <OnEnable>(); AddNode(node); } if (GetNode <OnUpdate>() == null) { var node = NodeReflection.Instantiate <OnUpdate>(); node.Position = new Vector2(0, 100); AddNode(node); } }