using System.Collections; using System.Collections.Generic; using DefaultNamespace.ProcessMode; using UnityEngine; public class test : MonoBehaviour { // Start is called before the first frame update void Start() { } void Update() { if (Input.GetMouseButtonDown(0)) // 0 表示鼠标左键 { Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition); // 从鼠标位置发射射线 RaycastHit hit; if (Physics.Raycast(ray, out hit)) { Debug.Log("击中物体: " + hit.collider.name); MotionFramework.MotionEngine.GetModule().HandleClick(hit.collider.name); } } } }