- i am struggling to activate deactivate gameobjects any one correct the solution
-
using UnityEngine;
using System.Collections;
public class objectenabler : MonoBehaviour {
// Use this for initialization
public string obl;
private GameObject A;
void Start () {
}
void OnTriggerExit (Collider other){
if (other.gameObject.tag == "player") {
A = GameObject.FindGameObjectsWithTag (obl);
foreach (GameObject B in A) {
A = gameObject.SetActive (true);
}
}
}
// Update is called once per frame
void Update () {
}
}