I’m relatively new to unity so most stuff will go over my head but I have this script that destroys an object after a set time, it worked in the past but suddenly has stopped working, the same thing has happened with multiple scripts. I can see it is something to do with monobehaviour but everything i’ve tried isn’t working.
Please help
That usually only happens when the name of the Monobehaviour is different than the name of the script, so it looks like things should be working for you. When Unity starts to do strange things like this to me, I like to right-click the asset folder (in the Unity project window) and click “Reimport All”. If that does not work, try closing Unity, deleting any Library or Temp folders from your project, then starting it up again.
Also, as a new developer, I cannot recommend strongly enough that you start using GIT or another form of source control as soon as possible. It allows you to “undo” as far back in time as you need to, so you can always revert to a working version of your project when weird things like this happen.