- Home /
 
 
               Question by 
               tarasfromlviv · Jun 20, 2016 at 03:09 PM · 
                androidjniandroidjni  
              
 
              Is it possible to cast AndroidJavaObject to its java subclass in C#?
Ok, for example I have AndroidJavaObject reference of Animal class. Can I cast it to Elephant AndroidJavaObject if I know that it is an Elephant (Elephant extends Animal in java).
The question is can I cast AndroidJavaObject to another AndroidJavaObject that is its subclass in java?
               Comment
              
 
               
               
               Best Answer 
              
 
              Answer by tarasfromlviv · Jul 30, 2016 at 06:58 PM
I figured it out myself. Here is an article explaining how to do that http://www.devua.co/2016/07/30/type-casting-androidjavaobject-in-unity-from-c/
Your answer