problem is in bold lines
using UnityEngine;
using System.Collections;
public class Triggerenter : MonoBehaviour {
public AudioSource beep;
**public GameObject SeceneTestMap;**
void Update () {
}
void OnTriggerEnter(Collider other)
{
**float hedefCount = SeceneTestMap.GetComponent<SceneTest_Map>().gidilenHedef;**
Debug.Log("Bastın");
beep.Play();
**hedefCount += 1f;**
Destroy(gameObject);
}
}
I have SceneTest_Map script and public float gidilenHefed = 0f; at this script
i need to count how many object destroyed so i added hedefCount += 1 but gidilenHedef is not increasing at another script why?