示例#1
0
        private void DrawTypeSelect(Rect selectRect, ReflectedProperty property)
        {
            Type newConsiderationType;

            if (property.Value != null)
            {
                considerationType    = property.Value.GetType();
                newConsiderationType = EditorGUIX.ConstructableTypePopup <Consideration>(selectRect, considerationType, FormatTypeName, style);
            }
            else
            {
                considerationType    = null;
                newConsiderationType = EditorGUIX.ConstructableTypePopup <Consideration>(selectRect, considerationType, FormatTypeName, style);
            }

            if (newConsiderationType != considerationType)
            {
                considerationType = newConsiderationType;
                Consideration instance = EditorReflector.MakeInstance <Consideration>(considerationType);
                property.SetValueAndCopyCompatibleProperties(instance);
            }
        }