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; } }
转载于:https://www.cnblogs.com/leng-yuye/archive/2012/08/02/2619561.html