Skip to content

Instantly share code, notes, and snippets.

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