C#-设置活动不工作?
有人能告诉我为什么我的游戏对象不能再次激活吗 谢谢 C#代码C#-设置活动不工作?,c#,unity3d,activation,gameobject,C#,Unity3d,Activation,Gameobject,有人能告诉我为什么我的游戏对象不能再次激活吗 谢谢 C#代码 using UnityEngine; using System.Collections; public class SlowerPowerUP : MonoBehaviour { // Use this for initialization void Start () { } // Update is called once per frame void Update () {
using UnityEngine;
using System.Collections;
public class SlowerPowerUP : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if (BirdMovement.CountFS > 300) {
gameObject.SetActive(true);
}
else {
gameObject.SetActive(false);
}
}
}
停用的对象未接收unity事件(更新、修复更新等)。所以
gameObject.SetActive(true)代码>将不会被调用当你给我的问题评分为负数时,请告诉我为什么?!您需要添加更多相关代码,缺少的代码太多。请提供预期行为、运行程序时的任何错误消息以及与问题相关的所有代码。如果有很多代码,请将其发布到gist或pastebin文件中。