在点击事件中添加GComponent组件,偶现报错!

在按键的点击事件中代码添加GComponent组件,连续点击后,会偶现报错,几率很大。报错输出如下:
NullReferenceException: Object reference not set to an instance of an object
FairyGUI.GRoot.BringToFront (FairyGUI.Window win) (at Assets/Framework/Depends/FairyGUI/Scripts/UI/GRoot.cs:172)
FairyGUI.Window.BringToFront () (at Assets/Framework/Depends/FairyGUI/Scripts/UI/Window.cs:267)
FairyGUI.Window.__touchBegin (FairyGUI.EventContext context) (at Assets/Framework/Depends/FairyGUI/Scripts/UI/Window.cs:512)
FairyGUI.EventBridge.CallCaptureInternal (FairyGUI.EventContext context) (at Assets/Framework/Depends/FairyGUI/Scripts/Event/EventBridge.cs:164)
FairyGUI.EventDispatcher.BubbleEvent (System.String strType, System.Object data, System.Collections.Generic.List`1[T] addChain) (at Assets/Framework/Depends/FairyGUI/Scripts/Event/EventDispatcher.cs:304)
FairyGUI.EventDispatcher.BubbleEvent (System.String strType, System.Object data) (at Assets/Framework/Depends/FairyGUI/Scripts/Event/EventDispatcher.cs:360)
FairyGUI.Stage.HandleMouseEvents () (at Assets/Framework/Depends/FairyGUI/Scripts/Core/Stage.cs:1073)
FairyGUI.Stage.HandleEvents () (at Assets/Framework/Depends/FairyGUI/Scripts/Core/Stage.cs:939)
FairyGUI.Stage.InternalUpdate () (at Assets/Framework/Depends/FairyGUI/Scripts/Core/Stage.cs:745)
FairyGUI.StageEngine.LateUpdate () (at Assets/Framework/Depends/FairyGUI/Scripts/Core/StageEngine.cs:22)
求解!!!!
已邀请:

谷主

赞同来自: zhangj1919

改了

要回复问题请先登录注册