[OnInspectorInit("@Texture = Sirenix.Utilities.Editor.EditorIcons.OdinInspectorLogo")]
[OnInspectorGUI("DrawPreview", append: true)]
public Texture2D Texture;
private void DrawPreview()
{
if (this.Texture == null) return;
GUILayout.BeginVertical(GUI.skin.box);
GUILayout.Label(this.Texture);
GUILayout.EndVertical();
}
[OnInspectorGUI]
private void OnInspectorGUI()
{
UnityEditor.EditorGUILayout.HelpBox("OnInspectorGUI can also be used on both methods and properties", UnityEditor.MessageType.Info);
}