Abdul Mukheem Shaik 35fcbc1e24 initial commit
2024-11-06 18:38:19 +01:00

14 lines
255 B
C#

using UnityEngine;
public class DestroyByPosition : MonoBehaviour
{
public float destroyPositionY = -10;
void Update()
{
if(transform.position.y < destroyPositionY)
{
Destroy(this.gameObject);
}
}
}