Example #1
0
 private void OnCollisionExit(Collision collision)
 {
     if (collision.gameObject.TryGetComponent(out Buttonv2 button))
     {
         myButton = null;
     }
 }
Example #2
0
 private void OnCollisionEnter(Collision collision)
 {
     if (collision.gameObject.TryGetComponent(out Buttonv2 button))
     {
         myButton = button;
     }
 }
Example #3
0
 private void RemoveFromButton()
 {
     myButton.OnTransformLeave(elementHandler);
     myButton = null;
 }