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,需要你手动去删除。
删除掉这个,然后再重新打包就行了。
或者是你重新再另创一个文件夹,导出到新建的文件夹就行了。