Skip to content

Instantly share code, notes, and snippets.

@JoseMiguelPizarro
Created August 31, 2019 12:54
Show Gist options
  • Save JoseMiguelPizarro/e553e88dbaa705851b4a9d5aa61a9314 to your computer and use it in GitHub Desktop.
Save JoseMiguelPizarro/e553e88dbaa705851b4a9d5aa61a9314 to your computer and use it in GitHub Desktop.
toolsButton GUIContent[]
[CustomEditor(typeof(LevelMesh))]
public class LevelMeshEditor : Editor
{
private GUIContent selectButton;
private string selectButtonIconPath = "Assets/Resources/Icons/select.png";
private GUIContent[] toolsButton;
private void OnEnable()
{
Texture2D selectButtonIcon = AssetDatabase.LoadAssetAtPath<Texture2D>(selectButtonIconPath);
selectButton = new GUIContent(selectButtonIcon);
toolsButton = new GUIContent[] {selectButton};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment