Eazy-Sound-Manager
Eazy-Sound-Manager copied to clipboard
UnityException FindObjectsOfType
UnityException: FindObjectsOfType is not allowed to be called from a MonoBehaviour constructor (or instance field initializer), call it in Awake or Start instead. Called from MonoBehaviour 'EazySoundManager' on game object 'GameManager'.
Line 68 in EazySoundManager script
instance = (EazySoundManager)FindObjectOfType(typeof(EazySoundManager));
any update on this?
@LAVendeta @rameshporeddy Sorry for the delay, it was an extremely busy month and I could not work on it.
I will take a look into the issue and update you very soon.
any update on this?
Also waiting for update on this. On the meanwhile I just commented that line as I can't perceive any case where variable instance can be set to null while an instance of EZ is still there, and seems to be working without problems.
any update on this?
Restarting Unity makes the error go away. It started when I added Soundmanager to a GameObject to test something, after deleting it, it seems Soundmanager isnt properly destroyed.
The problem still persists