-2

can someone tells me why my gameObject doesn't activate again?

Thanks.

C# Code

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);
        }
    }
}
Eris
  • 7,378
  • 1
  • 30
  • 45
xXElsterXx
  • 39
  • 1
  • 1
  • 10

1 Answers1

2

Deactivated objects are not receiving unity events (Update, FixedUpdate etc). So gameObject.SetActive(true); will not be called