摘要:
创建一个cube的go 绑定一个脚本代码:using UnityEngine;using System.Collections;public class Mouse : MonoBehaviour{ Ray ray; RaycastHit hit; void Update() { if (Input.GetMouseButton(0)) { ray = Camera.main.ScreenPointToRay(Input.mousePosition); if (Physics.Raycast(ra... 阅读全文
摘要:
using UnityEngine;using System.Collections;public class ShowHide : MonoBehaviour { public Texture2D img; void Update () { if (Time.time % 2 < 1) { guiTexture.texture = img; } else guiTexture.texture = null; }} 阅读全文