8,303
社区成员
发帖
与我相关
我的任务
分享
void FixedUpdate ()
{
if (useMouse && Application.isPlaying && handlesEvents)
{
hoveredObject = Raycast(Input.mousePosition, ref lastHit) ? lastHit.collider.gameObject : fallThrough;
if (hoveredObject == null) hoveredObject = genericEventHandler; else Debug.Log(hoveredObject.gameObject.name);
for (int i = 0; i < 3; ++i) mMouse[i].current = hoveredObject;
}
}
我只是说建议你输出一下Debug.Log