示例#1
0
        private void OnGUI()
        {
            if (string.IsNullOrWhiteSpace(_exportFolder))
            {
                PickFolder();
            }
            _exportFolder = EditorGUILayout.TextField("Export Folder", _exportFolder);
            if (GUILayout.Button("Pick"))
            {
                PickFolder();
            }
            _override = EditorGUILayout.Toggle("Override existing files", _override);

            var selected = false;

            if (Selection.assetGUIDs.Length != 0)
            {
                _selected = EditorGUILayout.Toggle("Export selected assets", _selected);
                selected  = _selected;
            }

            if (!string.IsNullOrWhiteSpace(_exportFolder))
            {
                if (GUILayout.Button("Export"))
                {
                    ExportAssets.ExportToUrho(_exportFolder, _override, selected);
                    Close();
                }
            }

            //EditorGUILayout.BeginHorizontal();
            //EditorGUILayout.EndHorizontal();
        }
示例#2
0
        protected XmlTextWriter CreateXmlFile(AssetContext asset)
        {
            var file = ExportAssets.CreateFile(asset.UrhoFileName);

            return(new XmlTextWriter(file, new UTF8Encoding(false)));
        }