浏览代码

fix copy

/main
siyao 3 年前
当前提交
4f05a4d4
共有 1 个文件被更改,包括 13 次插入4 次删除
  1. 17
      com.unity.uiwidgets/Runtime/engine/UIWidgetsPanel.cs

17
com.unity.uiwidgets/Runtime/engine/UIWidgetsPanel.cs


}
}
[ExecuteInEditMode]
public partial class UIWidgetsPanel : RawImage, IUIWidgetsWindow {
static List<UIWidgetsPanel> panels = new List<UIWidgetsPanel>();

#endregion
IEnumerator ReEnableUIWidgetsNextFrame() {
yield return new WaitForEndOfFrame();
yield return null;
enabled = true;
}

#if !UNITY_EDITOR && UNITY_ANDROID
if (!IsAndroidInitialized()) {return ;}
#endif
if(canvas == null){
Debug.Log("get null canvas");
enabled = false;
startCoroutine(ReEnableUIWidgetsNextFrame());
return;
}
#if !UNITY_EDITOR && UNITY_IOS
//the hook API cannot be automatically called on IOS, so we need try hook it here
Hooks.tryHook();

}
protected override void OnDisable() {
unregisterPanel(this);
D.assert(_wrapper != null);
_wrapper?.Destroy();
if (_wrapper != null) {
unregisterPanel(this);
_wrapper?.Destroy();
}
_wrapper = null;
texture = null;
Input_OnDisable();

正在加载...
取消
保存