mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-22 08:33:50 +00:00
修复Unity6的一些代码警告问题
This commit is contained in:
@@ -19,7 +19,11 @@ namespace XCharts.Editor
|
||||
GameObject selectObj = Selection.activeGameObject;
|
||||
if (selectObj == null)
|
||||
{
|
||||
#if UNITY_2023_1_OR_NEWER
|
||||
var canvas = UnityEngine.Object.FindFirstObjectByType<Canvas>();
|
||||
#else
|
||||
var canvas = GameObject.FindObjectOfType<Canvas>();
|
||||
#endif
|
||||
if (canvas != null) return canvas.transform;
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user