/// <summary>
        /// Extract Property and Decorator drawers for property
        /// </summary>
        public void HandleDrawnType(Type drawnType, Type propertyType, FieldInfo field, PropertyAttribute attribute)
        {
            Type drawerTypeForType = StratusScriptAttributeUtility.GetDrawerTypeForType(drawnType);

            if (drawerTypeForType != null)
            {
                if (typeof(PropertyDrawer).IsAssignableFrom(drawerTypeForType))
                {
                    if (propertyType != null && propertyType.IsArrayOrList())
                    {
                        return;
                    }
                    propertyDrawer = (PropertyDrawer)Activator.CreateInstance(drawerTypeForType);

                    propertyDrawer.SetFieldInfo(field);
                    propertyDrawer.SetAttribute(attribute);
                }
                else if (typeof(DecoratorDrawer).IsAssignableFrom(drawerTypeForType))
                {
                    if (field != null && field.FieldType.IsArrayOrList() && !propertyType.IsArrayOrList())
                    {
                        return;
                    }
                    DecoratorDrawer decoratorDrawer = (DecoratorDrawer)Activator.CreateInstance(drawerTypeForType);

                    decoratorDrawer.SetAttribute(attribute);
                    if (decoratorDrawers == null)
                    {
                        decoratorDrawers = new List <DecoratorDrawer>();
                    }
                    decoratorDrawers.Add(decoratorDrawer);
                }
            }
        }
        /// <summary>
        /// Draw all properties from begin to end, and return the rect taken up.
        /// </summary>
        private Rect DrawPropertyNestedRange(Rect position, int indentOffset, SerializedProperty begin, SerializedProperty end)
        {
            // Track the top so we know how tall the whole drawn area was
            float top = position.yMin;

            SerializedProperty cur = begin.Copy();

            while (!SerializedProperty.EqualContents(cur, end))
            {
                EditorGUI.indentLevel = cur.depth + indentOffset;
                position.y           += PROPERTY_MARGIN;

                StratusSerializedPropertyHandler curHandler = StratusScriptAttributeUtility.GetHandler(cur);
                position.height = curHandler.GetHeight(cur, StratusEditorUtility.TempContent(cur.displayName), cur.isExpanded);

                EditorGUI.BeginChangeCheck();
                curHandler.OnGUI(position, cur, null, true);
                position.y += position.height;

                if (EditorGUI.EndChangeCheck())
                {
                    break;
                }

                cur.NextVisible(false);
            }

            position.yMin = top;
            return(position);
        }
        /// <summary>
        /// Calculate the height taken up by all properties from begin to end.
        /// </summary>
        private float GetHeightNestedRange(SerializedProperty begin, SerializedProperty end)
        {
            float height = 0f;

            SerializedProperty cur = begin.Copy();

            while (!SerializedProperty.EqualContents(cur, end))
            {
                StratusSerializedPropertyHandler curHandler = StratusScriptAttributeUtility.GetHandler(cur);
                float curHeight = curHandler.GetHeight(cur, StratusEditorUtility.TempContent(cur.displayName), cur.isExpanded);
                height += curHeight + PROPERTY_MARGIN;
                cur.NextVisible(false);
            }

            return(height);
        }