Eonirr

Untitled

May 19th, 2025
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. public class MySOEditor : Editor
  2. {
  3. SerializedProperty mySprite;
  4.  
  5. void OnEnable()
  6. {
  7. mySprite = serializedObject.FindProperty("mySprite");
  8. }
  9.  
  10. public override void OnInspectorGUI()
  11. {
  12. serializedObject.Update();
  13.  
  14. EditorGUILayout.PropertyField(mySprite, GUIContent.none, GUILayout.Width(128), GUILayout.Height(128));
  15.  
  16. serializedObject.ApplyModifiedProperties();
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment