Example #1
0
        protected override EditorGUIElement PushState()
        {
            EditTarget target = GetProperty().GetContents();
            EditorGUIElement_Container_Flow_Multiline container = new EditorGUIElement_Container_Flow_Multiline();

            if (target.IsValid())
            {
                container.AddWeightedChild(0.3f, target.ForceProperty("type").CreateEditorGUIElement());
                container.AddWeightedChild(0.2f, target.ForceProperty("name").CreateEditorGUIElement());
                container.AddWeightedChild(0.4f,
                                           new EditorGUIElement_Complex_EditPropertySingleValue_TypedObject(
                                               target.ForcePropertyValue("value"),
                                               target.ForcePropertyValue("type")
                                               )
                                           );
            }

            return(container);
        }
Example #2
0
 static public EditProperty_Array ForcePropertyArray(this EditTarget item, string path)
 {
     return(item.ForceProperty(path)
            .Convert <EditProperty_Array>()
            .AssertNotNull(() => new MissingFieldException("The property for type " + item.GetTargetType() + " at path " + path + " cannot be treated as an arrary.")));
 }