Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MySOEditor : Editor
- {
- SerializedProperty mySprite;
- void OnEnable()
- {
- mySprite = serializedObject.FindProperty("mySprite");
- }
- public override void OnInspectorGUI()
- {
- serializedObject.Update();
- EditorGUILayout.PropertyField(mySprite, GUIContent.none, GUILayout.Width(128), GUILayout.Height(128));
- serializedObject.ApplyModifiedProperties();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment