Problem: My problem is caused by ONE AUDIO not being played frequently with each click that occurs, basically it happens only once, and when the audio ends it plays again, ignoring that there can have two audios playing at once
my code:
void TMPAUDI()
{
GameObject obj = new("audi");
obj.AddComponent<AudioSource>();
//obj.GetComponent<AudioSource>().PlayOneShot(Hitmarker, (float)ConfigManager.GetSavedValue("hitmarkVolume")); TESTED
obj.GetComponent<AudioSource>().clip = Hitmarker;
obj.GetComponent<AudioSource>().volume = (float)ConfigManager.GetSavedValue("hitmarkVolume");
obj.GetComponent<AudioSource>().Play();
Destroy(obj, Hitmarker.length + 0.5f);
}
notes:
- I was using unity beta 2023.1.0.b9 (I think) but for TextMeshPro problems I had to change
- This only happens on android
- [EDIT] Problem ocurred on 2023.1.0b10 BETA
I tried:
- use PlayOneShot
- put delay on Destroy()
- Cry