浏览代码

move editor utils into runtime

/main
fzhangtj 6 年前
当前提交
b8ca89a1
共有 7 个文件被更改,包括 7 次插入48 次删除
  1. 9
      Runtime/editor/editor_utils.cs
  2. 27
      Editor/EditorExample.cs
  3. 11
      Editor/EditorExample.cs.meta
  4. 8
      Editor/editor.meta
  5. 0
      /Runtime/editor/editor_utils.cs
  6. 0
      /Runtime/editor/editor_utils.cs.meta

9
Runtime/editor/editor_utils.cs


#if UNITY_EDITOR
using UnityEditor;
using UnityEditor;
namespace Unity.UIWidgets.Editor {
[InitializeOnLoad]
public class EditorUtils {

return true;
}
}
}
}
#endif

27
Editor/EditorExample.cs


// -----------------------------------------------------------------------------
//
// Use this editor example C# file to develop editor (non-runtime) code.
//
// -----------------------------------------------------------------------------
namespace Unity.UIWidgets.Editor {
/// <summary>
/// Provide a general description of the public class.
/// </summary>
/// <remarks>
/// Packages require XmlDoc documentation for ALL Package APIs.
/// https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/xml-documentation-comments
/// </remarks>
public class MyPublicEditorExampleClass {
/// <summary>
/// Provide a description of what this private method does.
/// </summary>
/// <param name="parameter1"> Description of parameter 1 </param>
/// <param name="parameter2"> Description of parameter 2 </param>
/// <param name="parameter3"> Description of parameter 3 </param>
/// <returns> Description of what the function returns </returns>
public int CountThingsAndDoStuff(int parameter1, int parameter2, bool parameter3) {
return parameter3 ? (parameter1 + parameter2) : (parameter1 - parameter2);
}
}
}

11
Editor/EditorExample.cs.meta


fileFormatVersion: 2
guid: 064eb42010c5a4828bd610b038b60701
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
Editor/editor.meta


fileFormatVersion: 2
guid: c339d59e8c37a49fdb2a6365764259fd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

/Editor/editor/EditorUtils.cs → /Runtime/editor/editor_utils.cs

/Editor/editor/EditorUtils.cs.meta → /Runtime/editor/editor_utils.cs.meta

正在加载...
取消
保存