void OnSceneGUI(SceneView sceneView) { if (toolsSelected == 0) { ToolGeneric.ChangeSpriteToClick(); } if (toolsSelected == 1) { } if (toolsSelected == 2) { } }
void OnGUI() { arrayIconeTool = Resources.LoadAll <Texture>("Resources/MapEdit2D/_SPRITE/IconeTools"); windowToolSelected = GUILayout.Toolbar(windowToolSelected, new string[] { "Generator", "Tools" }); switch (windowToolSelected) { case 1: EditorGUILayout.Space(); ToolGeneric.CreateButonSearchSpriteFolder(); GUILayout.BeginHorizontal(); GUILayout.TextField(ToolGeneric.pathFolderSprite); ToolGeneric.CreateButtonSearchSprite(); GUILayout.EndHorizontal(); toolsSelected = GUILayout.Toolbar(toolsSelected, new string[] { "1", "2", "3" }); switch (toolsSelected) { default: paintSize = EditorGUILayout.IntSlider("Paint size : ", paintSize, 1, 10, new GUILayoutOption[] { }); EditorGUILayout.Space(); ToolGeneric.CreateSpriteGridScrollView(); break; case 1: break; case 2: break; } break; default: EditorGUILayout.Space(); gridName = EditorGUILayout.TextField("Grid Name : ", gridName); gridSize = EditorGUILayout.Vector2IntField("Grid size :", gridSize); tilesType = EditorGUILayout.Popup("Type", tilesType, new string[] { "Square", "Isometric", "Hexagonal" }); EditorGUILayout.Space(); if (GUILayout.Button("Generate Grid")) { ToolGridGenerator.GridGen(gridSize.y, gridSize.x); } break; } }