コード例 #1
0
        private DocumentationAsset.Element DrawElement(Rect position, DocumentationAsset.Element element)
        {
            //element.type = (DocumentationAsset.ElementType)EditorGUI.(position, element.type);
            switch (element.type)
            {
            case DocumentationAsset.ElementType.Text:
                EditorGUILayout.TextArea(element.text);
                break;

            case DocumentationAsset.ElementType.Image:
                break;

            case DocumentationAsset.ElementType.Video:
                break;
            }
            return(element);
        }
コード例 #2
0
        //public override void OnBaseEditorGUI()
        //{
        //  //DrawReorderableList(target.elements, DrawElement);
        //
        //  foreach (var element in target.elements)
        //    Draw(element);
        //}

        private void Draw(DocumentationAsset.Element element)
        {
            if (element == null)
            {
                return;
            }

            switch (element.type)
            {
            case DocumentationAsset.ElementType.Text:
                break;

            case DocumentationAsset.ElementType.Image:
                break;

            case DocumentationAsset.ElementType.Video:
                break;
            }
        }