Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@ public FrameLayout requestFrame() throws NoSuchMethodException {

return (FrameLayout) getFrameLayout.invoke(unityPlayer);
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
return unityPlayer;
// If it is old UnityPlayer, use isInstance() and cast() to bypass incompatible type checks when compiling using newer versions of UnityPlayer
if (FrameLayout.class.isInstance(unityPlayer)) {
return FrameLayout.class.cast(unityPlayer);
} else {
return null;
}
}
}

Expand Down