Skip to content

Instantly share code, notes, and snippets.

@W4RH4WK
Created February 28, 2019 12:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save W4RH4WK/99f3654c2c5a30c2f2c8303bf50a36af to your computer and use it in GitHub Desktop.
Save W4RH4WK/99f3654c2c5a30c2f2c8303bf50a36af to your computer and use it in GitHub Desktop.
Unity Collision Logger Component
using UnityEngine;
public class CollisionLogger : MonoBehaviour
{
void OnTriggerEnter() => Debug.Log("Trigger Enter");
void OnTriggerStay() => Debug.Log("Trigger Stay");
void OnTriggerExit() => Debug.Log("Trigger Exit");
void OnCollisionEnter() => Debug.Log("Collision Enter");
void OnCollisionStay() => Debug.Log("Collision Stay");
void OnCollisionExit() => Debug.Log("Collision Exit");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment