浏览代码

Merge pull request #72 from UnityTech/kgdev

remove Awake.
/main
GitHub 6 年前
当前提交
3d395cf8
共有 9 个文件被更改,包括 19 次插入20 次删除
  1. 5
      README-ZH.md
  2. 5
      README.md
  3. 3
      Runtime/editor/editor_window.cs
  4. 4
      Samples/UIWidgetSample/MaterialSample.cs
  5. 5
      Samples/UIWidgetSample/txt/FontWeightStyle.cs
  6. 4
      Samples/UIWidgetsGallery/Editor/GalleryMainEditor.cs
  7. 5
      Samples/UIWidgetsGallery/GalleryMain.cs
  8. 4
      Samples/UIWidgetsTheatre/UIWidgetsTheatre.cs
  9. 4
      Tests/Editor/Widgets.cs

5
README-ZH.md


namespace UIWidgetsSample {
public class UIWidgetsExample : UIWidgetsPanel {
protected override void Awake() {
base.Awake();
protected override void OnEnable() {
// Application.targetFrameRate = 60; // or higher if you want a smoother scrolling experience.
// if you want to use your own font or font icons.

// add material icons, familyName must be "Material Icons"
// FontManager.instance.addFont(Resources.Load<Font>(path: "path to material icons"), "Material Icons");
base.OnEnable();
}
protected override Widget createWidget() {

5
README.md


namespace UIWidgetsSample {
public class UIWidgetsExample : UIWidgetsPanel {
protected override void Awake() {
base.Awake();
protected override void OnEnable() {
// Application.targetFrameRate = 60; // or higher if you want a smoother scrolling experience.
// if you want to use your own font or font icons.

// add material icons, familyName must be "Material Icons"
// FontManager.instance.addFont(Resources.Load<Font>(path: "path to material icons"), "Material Icons");
base.OnEnable();
}
protected override Widget createWidget() {

3
Runtime/editor/editor_window.cs


this.wantsMouseEnterLeaveWindow = true;
}
protected virtual void Awake() {
}
protected virtual void OnEnable() {
if (this._windowAdapter == null) {
this._windowAdapter = new EditorWindowAdapter(this);

4
Samples/UIWidgetSample/MaterialSample.cs


home: this.testCases[this.testCaseId]);
}
protected override void Awake() {
base.Awake();
protected override void OnEnable() {
base.OnEnable();
}
}

5
Samples/UIWidgetSample/txt/FontWeightStyle.cs


namespace UIWidgetsSample {
public class FontWeightStyle : UIWidgetsSamplePanel {
protected override void Awake() {
base.Awake();
protected override void OnEnable() {
// To run this sample, you need to download Roboto fonts and place them under Resources/Fonts folder
// Roboto fonts could be downloaded from google website
// https://fonts.google.com/specimen/Roboto?selection.family=Roboto

FontWeight.w100);
FontManager.instance.addFont(Resources.Load<Font>(path: "Fonts/Roboto-ThinItalic"), "Roboto",
FontWeight.w100, FontStyle.italic);
base.OnEnable();
}
protected override Widget createWidget() {

4
Samples/UIWidgetsGallery/Editor/GalleryMainEditor.cs


return new GalleryApp();
}
protected override void Awake() {
base.Awake();
protected override void OnEnable() {
base.OnEnable();
}
}
}

5
Samples/UIWidgetsGallery/GalleryMain.cs


return new GalleryApp();
}
protected override void Awake() {
base.Awake();
protected override void OnEnable() {
base.OnEnable();
}
}
}

4
Samples/UIWidgetsTheatre/UIWidgetsTheatre.cs


home: entries[this.testCaseId].entryWidget);
}
protected override void Awake() {
base.Awake();
protected override void OnEnable() {
base.OnEnable();
}
}

4
Tests/Editor/Widgets.cs


this.windowAdapter.Update();
}
void Awake() {
void OnEnable() {
}
void OnEnable() {
this.windowAdapter = new EditorWindowAdapter(this);
this.windowAdapter.OnEnable();
}

正在加载...
取消
保存