You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.
In this case, when I try to get list[2].GetType(), I get typeof(A).
I was able to get actual type of it using code below
publicstatic Type GetActualType(Il2CppSystem.Object obj){varcpptype= obj.GetIl2CppType();return Type.GetType(cpptype.AssemblyQualifiedName);}
but I cannot cast object into type with cppobj.Cast<actualType>() because I cannot provide type variable into it. Is there any other way to cast il2cpp object into specific type variable in runtime?
The text was updated successfully, but these errors were encountered:
akintos
changed the title
Polymorphism and get object with actual type
Polymorphism and casting object with actual type
Dec 14, 2021
akintos
changed the title
Polymorphism and casting object with actual type
Polymorphism and casting object into actual type
Dec 14, 2021
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
For example,
In this case, when I try to get
list[2].GetType()
, I gettypeof(A)
.I was able to get actual type of it using code below
but I cannot cast object into type with
cppobj.Cast<actualType>()
because I cannot provide type variable into it. Is there any other way to cast il2cpp object into specific type variable in runtime?The text was updated successfully, but these errors were encountered: