编辑器扩展接口使用问题CS.FairyEditor.FPackage:MoveItem

CS.FairyEditor.FPackage:MoveItem(pi, path) 第二个参数尝试过相对路径和绝对路径会报

[17:19:35] LuaException: c# exception:The given key was not present in the dictionary.,stack:  at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x00000] in <00000000000000000000000000000000>:0 
  at FairyEditor.FPackage.MoveItem (FairyEditor.FPackageItem pi, System.String path) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <00000000000000000000000000000000>:0 
  at XLua.OverloadMethodWrap.Call (System.IntPtr L) [0x00000] in <00000000000000000000000000000000>:0 
  at XLua.MethodWrap.Call (System.IntPtr L) [0x00000] in <00000000000000000000000000000000>:0 
  at System.Diagnostics.Tracing.EnumHelper`1+Transformer`1[UnderlyingType,ValueType].Invoke (ValueType value) [0x00000] in <00000000000000000000000000000000>:0 
  at XLua.StaticLuaCallbacks.FixCSFunction (System.IntPtr L) [0x00000] in <00000000000000000000000000000000>:0 
  at XLua.LuaDLL.Lua.lua_pcall (System.IntPtr L, System.Int32 nArgs, System.Int32 nResults, System.Int32 errfunc) [0x00000] in <00000000000000000000000000000000>:0 
  at XLua.DelegateBridge.__Gen_Delegate_Imp35 (System.String p0) [0x00000] in <00000000000000000000000000000000>:0 
  at FairyGUI.PlayCompleteCallback.Invoke () [0x00000] in <00000000000000000000000000000000>:0 
  at FairyGUI.EventBridge.CallInternal (FairyGUI.EventContext context) [0x00000] in <00000000000000000000000000000000>:0 
  at FairyGUI.EventDispatcher.InternalDispatchEvent (System.String strType, FairyGUI.EventBridge bridge, System.Object data, System.Object initiator) [0x00000] in <00000000000000000000000000000000>:0 
  at FairyGUI.EventDispatcher.DispatchEvent (System.String strType, System.Object data) [0x00000] in <00000000000000000000000000000000>:0 
  at FairyGUI.PopupMenu.__clickItem (FairyGUI.EventContext context) [0x00000] in <00000000000000000000000000000000>:0 
  at FairyGUI.EventBridge.CallInternal (FairyGUI.EventContext context) [0x00000] in <00000000000000000000000000000000>:0 
  at FairyGUI.EventDispatcher.InternalDispatchEvent (System.String strType, FairyGUI.EventBridge bridge, System.Object data, System.Object initiator) [0x00000] in <00000000000000000000000000000000>:0 
  at FairyGUI.EventDispatcher.DispatchEvent (System.String strType, System.Object data) [0x00000] in <00000000000000000000000000000000>:0 
  at FairyGUI.EventBridge.CallInternal (FairyGUI.EventContext context) [0x00000] in <00000000000000000000000000000000>:0 
  at FairyGUI.EventDispatcher.BubbleEvent (System.String strType, System.Object data, System.Collections.Generic.List`1[T] addChain) [0x00000] in <00000000000000000000000000000000>:0 
  at FairyGUI.EventDispatcher.BubbleEvent (System.String strType, System.Object data) [0x00000] in <00000000000000000000000000000000>:0 
  at FairyGUI.Stage.HandleMouseEvents () [0x00000] in <00000000000000000000000000000000>:0 
  at FairyGUI.Stage.InternalUpdate () [0x00000] in <00000000000000000000000000000000>:0 
  at FairyGUI.StageEngine.LateUpdate () [0x00000] in <00000000000000000000000000000000>:0 
stack traceback:
[C]: in method 'MoveItem'
[string "Plugin-asset_tool"]:27: in function <[string "Plugin-asset_tool"]:13>
XLua.LuaEnv.ThrowExceptionFromError (System.Int32 oldTop) (at <00000000000000000000000000000000>:0)
XLua.DelegateBridge.__Gen_Delegate_Imp35 (System.String p0) (at <00000000000000000000000000000000>:0)
FairyGUI.PlayCompleteCallback.Invoke () (at <00000000000000000000000000000000>:0)
FairyGUI.EventBridge.CallInternal (FairyGUI.EventContext context) (at <00000000000000000000000000000000>:0)
FairyGUI.EventDispatcher.InternalDispatchEvent (System.String strType, FairyGUI.EventBridge bridge, System.Object data, System.Object initiator) (at <00000000000000000000000000000000>:0)
...
 
 
 
 以下是代码:
11111.png

 
已邀请:

谷主

赞同来自:

第二个参数用正斜杠

SunHowe

赞同来自:

在谷主的帮助下,分支路径的问题也解决了,详情看图:

Snipaste_2023-04-20_10-57-42.png

 

要回复问题请先登录注册