protected override void OnSPInspectorGUI()
        {
            //this.DrawDefaultInspector();

            this.serializedObject.Update();

            this.DrawPropertyField(EditorHelper.PROP_SCRIPT);

            var typeProp = this.serializedObject.FindProperty(PROP_SINGLETONTYPE);
            var label    = EditorHelper.TempContent("Singleton Type");
            var area     = EditorGUILayout.GetControlRect(true, _typeRefDrawer.GetPropertyHeight(typeProp, label));

            _typeRefDrawer.OnGUI(area, typeProp, label);

            var tp = TypeReferencePropertyDrawer.GetTypeFromTypeReference(typeProp);

            if (tp != null && typeof(IManagedSingleton).IsAssignableFrom(tp))
            {
                this.DrawPropertyField(PROP_CREATEIFNONE);
            }

            this.serializedObject.ApplyModifiedProperties();



            //DRAW MEMBERS FOR PREVIEW
            this.DrawTargetMembersPreview();
        }
Ejemplo n.º 2
0
        public void Draw()
        {
            Rect typeRefArea = EditorGUILayout.GetControlRect(true, _fieldDrawer.GetPropertyHeight(_property, _label));

            _fieldDrawer.OnGUI(typeRefArea, _property, _label);
        }