如果需要处理鼠标点击物体的情况,

可以当数据接触物体时,鼠标手势改变,然后点击后和NPC产生对话等:

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
    void OnMouseOver() {
        renderer.material.color -= new Color(0.1F, 0, 0) * Time.deltaTime;
    }
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-13
  • 2022-01-05
  • 2022-01-02
  • 2021-07-17
  • 2022-12-23
猜你喜欢
  • 2021-12-12
  • 2022-01-02
  • 2021-12-12
  • 2021-10-13
  • 2022-01-07
  • 2021-12-20
相关资源
相似解决方案