Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Parent instance = new Enfant();
- if (instance is Enfant enfantInstance)
- {
- Debug.Log(enfantInstance.enfantVar);
- }
- ----------OU------------
- Enfant enfantInstance = instance as Enfant;
- if (enfantInstance != null)
- {
- Debug.Log(enfantInstance.enfantVar);
- }
Advertisement
Add Comment
Please, Sign In to add comment