Skip to content

Instantly share code, notes, and snippets.

@JoseMiguelPizarro
Created August 31, 2019 14:17
Show Gist options
  • Save JoseMiguelPizarro/f76f6575016dfa05383598f4ed4eca0b to your computer and use it in GitHub Desktop.
Save JoseMiguelPizarro/f76f6575016dfa05383598f4ed4eca0b to your computer and use it in GitHub Desktop.
private GUIContent[] toolsButton;
private List<LevelMeshTool> tools;
private LevelMeshTool activeTool;
int m_selectedTool;
int selectedTool
{
get => m_selectedTool;
set
{
m_selectedTool = value;
activeTool = tools[m_selectedTool];
}
}
private void OnEnable()
{
tools = LevelMeshToolProvider.tools;
toolsButton = tools.Select(t => t.Content).ToArray();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment