Hey, so I am making a 2D endless runner, and after a certain period of time I want the platform underneath the player to disappear so the player cant just stand there to get a higher score. I am open to any and all help.
Thank you!!
Hey, so I am making a 2D endless runner, and after a certain period of time I want the platform underneath the player to disappear so the player cant just stand there to get a higher score. I am open to any and all help.
Thank you!!
Unity has a script for that in the Utility package of the Standard Assets.
From the Assets menu, Import package->Utility
You only need to import the TimedObjectDestructor.cs script that is in the Utility folder.
Attach that script to your platform object and set the TimeOut value in the inspector.
As soon as the object is created, the timer will start and when time runs out, the platform will be destroyed.