|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Runtime.InteropServices; |
|
|
|
using Unity.UIWidgets.service; |
|
|
|
using UnityEngine; |
|
|
|
|
|
|
|
namespace Unity.UIWidgets.engine { |
|
|
|
|
|
|
public static UIWidgetsMessageManager instance { |
|
|
|
get { return _instance; } |
|
|
|
} |
|
|
|
|
|
|
|
internal static void ensureUIWidgetsMessageManagerIfNeeded() { |
|
|
|
if (!Application.isPlaying) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (UIWidgetsMessageManager.instance != null) { |
|
|
|
return; |
|
|
|
} |
|
|
|
var managerObj = new GameObject("__UIWidgetsMessageManager"); |
|
|
|
managerObj.AddComponent<UIWidgetsMessageManager>(); |
|
|
|
} |
|
|
|
|
|
|
|
string _lastObjectName; |
|
|
|
|
|
|
|
|
|
|
void UpdateNameIfNeed() { |
|
|
|
var name = this.gameObject.name; |
|
|
|
if (name != this._lastObjectName) { |
|
|
|
this._lastObjectName = name; |
|
|
|
this._lastObjectName = name; |
|
|
|
#endif
|
|
|
|
} |
|
|
|
} |
|
|
|