Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2020
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.25 KB | None | 0 0
  1.     class Tester : MonoBehaviour
  2.     {
  3.         private void Awake()
  4.         {
  5.             Debug.Log(TryGetComponent<Fruit>(out var result));
  6.         }
  7.     }
  8.  
  9.     class Fruit : MonoBehaviour
  10.     {
  11.     }
  12.  
  13.     class Banana : Fruit
  14.     {
  15.  
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement