Unity - A计划(一年有效期) 扫二维码继续学习 二维码时效为半小时

(61评价)
价格: 2165.00元
sikis老师,unity不能使用OpenFileDialog吗?
新手123发起了问答2018-04-22
1
回复
2577
浏览

 我一运行“OpenFileDialog dialog = new OpenFileDialog();dialog.ShowDialog();”就会抛出

ArgumentException: GCHandle value belongs to a different domain
System.Runtime.InteropServices.GCHandle.op_Explicit (IntPtr value) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs:127)
System.Windows.Forms.XplatUIWin32.GetMessage (System.Windows.Forms.MSG& msg, IntPtr hWnd, Int32 wFilterMin, Int32 wFilterMax, Boolean blocking)
System.Windows.Forms.XplatUIWin32.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, IntPtr hWnd, Int32 wFilterMin, Int32 wFilterMax)
System.Windows.Forms.XplatUI.GetMessage (System.Object queue_id, System.Windows.Forms.MSG& msg, IntPtr hWnd, Int32 wFilterMin, Int32 wFilterMax)
System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context)
System.Windows.Forms.Form.ShowDialog (IWin32Window owner)
(wrapper remoting-invoke-with-check) System.Windows.Forms.Form:ShowDialog (System.Windows.Forms.IWin32Window)
System.Windows.Forms.CommonDialog.ShowDialog (IWin32Window owner)System.Windows.Forms.CommonDialog.ShowDialog ()
(wrapper remoting-invoke-with-check) System.Windows.Forms.CommonDialog:ShowDialog ()
SetPanel.SelectAvatarPic (System.String uid) (at Assets/Scripts/UIPanel/SetPanel.cs:137)
SetPanel.BtnEditAvatarClick () (at Assets/Scripts/UIPanel/SetPanel.cs:86)

这个错误。。。。。

所有回复
发表回复
你还没有登录,请先 登录或 注册!