浏览代码

fix bug in player

/siyaoH-1.17-PlatformMessage
xingweizhu 4 年前
当前提交
9e440bba
共有 2 个文件被更改,包括 14 次插入12 次删除
  1. 13
      com.unity.uiwidgets/Editor/UIWidgetsPanelEditor.cs
  2. 13
      com.unity.uiwidgets/Runtime/foundation/debug.cs

13
com.unity.uiwidgets/Editor/UIWidgetsPanelEditor.cs


using Unity.UIWidgets.engine;
using Unity.UIWidgets.engine2;
using Unity.UIWidgets.foundation;
using UnityEditor;
using UnityEditor.UI;
using UnityEngine;

EditorGUI.BeginChangeCheck();
UIWidgetsPanel panel = (UIWidgetsPanel)target;
serializedObject.ApplyModifiedProperties();
}
[MenuItem("UIWidgets/EnableDebug")]
public static void ToggleDebugMode(){
D.enableDebug = !D.enableDebug;
}
[MenuItem("UIWidgets/EnableDebug",true)]
public static bool CurrentDebugModeState() {
Menu.SetChecked("UIWidgets/EnableDebug", D.enableDebug );
return true;
}
}
}

13
com.unity.uiwidgets/Runtime/foundation/debug.cs


using System.Linq;
using Unity.UIWidgets.painting;
using Unity.UIWidgets.ui;
using UnityEditor;
using UnityEngine;
using Canvas = Unity.UIWidgets.ui.Canvas;
using Color = Unity.UIWidgets.ui.Color;

}
static bool? _enableDebug = null;
static bool enableDebug {
public static bool enableDebug {
get {
if (_enableDebug == null) {
_enableDebug = PlayerPrefs.GetInt("UIWidgetsDebug") == 1;

}
}
[MenuItem("UIWidgets/EnableDebug")]
public static void ToggleDebugMode(){
enableDebug = !enableDebug;
}
[MenuItem("UIWidgets/EnableDebug",true)]
public static bool CurrentDebugModeState() {
Menu.SetChecked("UIWidgets/EnableDebug", enableDebug );
return true;
}
public static void _debugDrawDoubleRect(Canvas canvas, Rect outerRect, Rect innerRect, Color color) {
var path = new Path();
path.fillType = PathFillType.evenOdd;

正在加载...
取消
保存