GUI Error: Invalid GUILayout state in FlowchartWindow view. Verify that all layout Begin/End calls match
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
第一個問題可以不用管,這個不影響,這個錯誤,但是可以正常運行,而且功能沒有任何影響,只是控制臺不斷報錯。
UnauthorizedAccessException: Access to the path 'ff7d1a3ac7b5e4571023e88f84da4f1578461c' is denied.
WeChatWASM.UnityUtil.DelectDir (System.String srcPath) (at <6151ead6b4d74a66a8f81e64401c5d30>:0)
WeChatWASM.WXConvertCore.ConvertCode () (at Assets/WX-WASM-SDK-V2/Editor/WXConvertCore.cs:661)
WeChatWASM.WXConvertCore.DoExport (System.Boolean buildWebGL) (at Assets/WX-WASM-SDK-V2/Editor/WXConvertCore.cs:180)
WeChatWASM.WXSettingsHelper.OnBuildButtonGUI (UnityEditor.EditorWindow window) (at Assets/WX-WASM-SDK-V2/Editor/WXEditorSettingHelper.cs:324)
WeChatWASM.WXEditorWin.OnGUI () (at Assets/WX-WASM-SDK-V2/Editor/WXEditorWindow.cs:43)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <b016465076314d89b32c8e26a2a45711>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <b016465076314d89b32c8e26a2a45711>:0)
UnityEditor.DockArea.OldOnGUI () (at <b016465076314d89b32c8e26a2a45711>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.IMGUIContainer.ProcessEvent (UnityEngine.UIElements.EventBase evt) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase evt) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <c04fb159eac34d88b6337ac5b13a0967>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <3d104a817cc9437693d8751dce4f4851>:0)
如何打印出這問題呢?
用類似于下面這幾行代碼就行了
string deletePath = Path.Combine(config.ProjectConf.DST, miniGameDir); Debug.Log($"[Converter] Deleting directory: {deletePath}"); UnityUtil.DelectDir(deletePath);
然后根據打印出的日志去刪除指定的文件夾。
第二個問題有可能是你之前工程打包的文件和當前Unity工程文件起了沖突,導致你第二個工程沒有權限去刪除上一個工程的minigame,需要你手動去刪除。
?
刪除掉這個,然后再重新打包就行了。?
或者是你重新再另創一個文件夾,導出到新建的文件夾就行了。?