unity ngui中出现问题Failed to call function OnClick of class...场景中的某个物体如下:代码内容如下:在运行的时候点击该物体出现错误:Failed to call function OnClick of class DogHeadSHakeCalling function OnClick wi

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/08 02:51:54

unity ngui中出现问题Failed to call function OnClick of class...场景中的某个物体如下:代码内容如下:在运行的时候点击该物体出现错误:Failed to call function OnClick of class DogHeadSHakeCalling function OnClick wi
unity ngui中出现问题Failed to call function OnClick of class...
场景中的某个物体如下:




代码内容如下:

在运行的时候点击该物体出现错误:
Failed to call function OnClick of class DogHeadSHake
Calling function OnClick with no parameters but the function requires 1.
UnityEngine.GameObject:SendMessage(String,Object,SendMessageOptions)
UICamera:Notify(GameObject,String,Object) (at Assets/NGUI/Scripts/UI/UICamera.cs:794)
UICamera:ProcessTouch(Boolean,Boolean) (at Assets/NGUI/Scripts/UI/UICamera.cs:1463)
UICamera:ProcessMouse() (at Assets/NGUI/Scripts/UI/UICamera.cs:1092)
UICamera:ProcessTouches() (at Assets/NGUI/Scripts/UI/UICamera.cs:1162)
UICamera:Update() (at Assets/NGUI/Scripts/UI/UICamera.cs:939)


请问这是怎么回事,该怎么解决?
物体中的碰撞体忘了勾IsTrigger,勾上以后同样还是有问题的.

unity ngui中出现问题Failed to call function OnClick of class...场景中的某个物体如下:代码内容如下:在运行的时候点击该物体出现错误:Failed to call function OnClick of class DogHeadSHakeCalling function OnClick wi
Calling function OnClick with no parameters but the function requires 1.
调用的OnClick函数没有参数列表,但实际上的OnClick函数却带有一个参数.