protected override void DrawStartGUI() { if (!hasTriedFinddingExample) { hasTriedFinddingExample = true; scriptDataService = new ConstellationEditorDataService(); scriptDataService.OpenConstellation(Application.dataPath + "/Constellation/Examples/Nodes/" + helpName + ".asset", false); Background = AssetDatabase.LoadAssetAtPath(editorPath + "background.png", typeof(Texture2D)) as Texture2D; Setup(); } else { if (Background != null) { for (var i = 0; i < 50; i++) { for (var j = 0; j < 25; j++) { Rect texRect = new Rect(i * Background.width, j * Background.height, Background.width, Background.height); GUI.DrawTexture(texRect, Background); } } } } }
public void Open(string _path = "") { var script = scriptDataService.OpenConstellation(_path); if (script == null) { return; } Setup(); }
public void Open(string _path = "") { scriptDataService = new ConstellationEditorDataService(); var script = scriptDataService.OpenConstellation(_path); if (script == null) { return; } Setup(); Repaint(); }
protected override void DrawStartGUI() { wantsMouseMove = true; if (!hasTriedFinddingExample) { hasTriedFinddingExample = true; scriptDataService = new ConstellationEditorDataService(); scriptDataService.OpenConstellation(Application.dataPath + "/Constellation/Examples/Nodes/" + helpName + ".asset", false); Background = AssetDatabase.LoadAssetAtPath(editorPath + "background.png", typeof(Texture2D)) as Texture2D; Setup(); } else { DrawBackgroundGrid(Screen.width, Screen.height); } }