Last active
August 31, 2019 13:01
-
-
Save JoseMiguelPizarro/b847b9c47982fdc7a86508d6fbf0670b to your computer and use it in GitHub Desktop.
Rendering tool bar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private int toolBarWidth = 50; | |
private int selectedTool; | |
private void OnSceneGUI() | |
{ | |
DrawToolBar(SceneView.lastActiveSceneView); | |
} | |
public void DrawToolBar(SceneView view) | |
{ | |
Rect rect = new Rect(0, 0, toolBarWidth, view.position.height); | |
GUILayout.BeginArea(rect, EditorStyles.textArea); | |
selectedTool = GUILayout.SelectionGrid(selectedTool, toolsButton, 1, EditorStyles.toolbarButton, GUILayout.Width(50), GUILayout.Height(50)); | |
GUILayout.EndArea(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment