System.Timers.Timer Corrupts Instantiate on unity LTS 2019.4 ; how to fix this?
if I use System.Timers.Timer and then Call Instantiate() in the OnTimedEvent(Object source, ElapsedEventAgrs e) Method it Corrupts the Instantiate-Method in every single Project I created until that point. If I say coruupted I mean Instantiate()'s not doing anything anymore. If i create a project after the corruption that project's working, until I call Instantiate in OnTimedEvent again (what i actually did after re-creating my project and doing the same thing again), I tested this issue 3 times so i can proof this being as i thought and every test did the same. How can I fix this? If I'm not able to fix this I wouldn't be able to do something else and i'd have to delete my projects.
How about..... Not using that class? There are plenty of alternatives to create timers in Unity.
https://docs.microsoft.com/en-us/dotnet/api/system.timers.timer?view=net-6.0
The server-based System.Timers.Timer class is designed for use with worker threads in a multithreaded environment.
Unity definitely does not like multithrreading, so I would seriously consider another approach.
Your answer
Follow this Question
Related Questions
ошибки/errors 0 Answers
Hundreds of Errors In A Fresh Project 0 Answers
I can´t play uity 0 Answers
OnApplicationFocus is called twice 0 Answers
Error when i running my NEW project Unity 2019.2.17f1 0 Answers