- Home /
Question by
frederickhgjfda · Jun 29, 2020 at 07:10 AM ·
kill player
How to solve problem of "GUI Error: You are pushing more GUIClips than you are popping"
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class KillPlayer : MonoBehaviour { [SerializeField]Transform spawnPoint;
void OnCollisionEnter2D(Collision2D col)
{
if(col.transform.CompareTag("Player"))
col.transform.position = spawnPoint.position;
}
}
Comment
Your answer
Follow this Question
Related Questions
what is the most efficient way to create a killbox 1 Answer
C# InstaKill method for 2d game? 2 Answers
Killing the player in a trigger zone. 1 Answer