- edited description
[Layout] PropertyField spacing is override by OdinWindow
Issue #421
new
I'm using Unity 2018.2.1f1 with Odin 2.0.3 on Windows 10 Enterprise 64. I can reproduce this behaviour with Editor Only Mode On and Off.
When creating a custom editor, using UnityEditor as base and Sirenix for style, the layout for PropertyField is override if I have an EditorWindow that use Odin:
My data (ScriptableObject):
using UnityEngine;
[CreateAssetMenu]
public class MyScriptableObjectData : ScriptableObject
{
public GameObject prefab;
}
My custom Editor:
using UnityEditor;
using Sirenix.Utilities.Editor;
[CustomEditor(typeof(MyScriptableObjectData))]
public class MyScriptableObjectDataCustomEditor : UnityEditor.Editor
{
public override void OnInspectorGUI()
{
this.serializedObject.UpdateIfRequiredOrScript();
SerializedProperty prefab = this.serializedObject.FindProperty("prefab");
SirenixEditorGUI.BeginBox("Prefab");
{
EditorGUILayout.PropertyField(prefab);
}
SirenixEditorGUI.EndBox();
this.serializedObject.ApplyModifiedProperties();
}
}
Here are some screenshots: https://imgur.com/a/aqc7n1A
Comments (2)
-
reporter -
I have removed the Odin Inspector plugin from the attached files. You don't need to send that to us ;)
- Log in to comment
Half the screenshots didn't show up, moved them outside (imgur).