Tag: ngui

统一。 一段时间后的函数调用

如何在一段时间后使对象不可见(或只是删除)? 使用NGUI。 我的例子(改变): public class scriptFlashingPressStart : MonoBehaviour { public GameObject off_Logo; public float dead_logo = 1.5f; void OffLogo() { off_Logo.SetActive(false); } //function onclick button //remove item after a certain time after pressing ??? void press_start() { InvokeRepeating(“OffLogo”, dead_logo , …); } }

在Unity3d中动态添加gameobject到场景

我正在创建一个场景,我想在其中显示优惠列表。 为了展示报价,我创建了一个带有占位符的预制件,用于我将在运行时获得的报价详细信息。 我在场景中创建了一个占位符,将预制件添加到场景中,但它没有在UI上显示。 OfferHolderClass: using UnityEngine; using System.Collections; public class OfferHolder : MonoBehaviour { public GameObject localOffer; // Use this for initialization void Start () { GameObject offer = Instantiate(localOffer) as GameObject; offer.GetComponent().Text = “Testing”; offer.transform.parent = this.transform; } // Update is called once per frame void Update () { } } 我是Unity的新手,我不确定我在这里缺少什么。