Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUnityPlayer and Unity 6 #1110

Open
justin-tsai opened this issue Oct 21, 2024 · 1 comment
Open

CUnityPlayer and Unity 6 #1110

justin-tsai opened this issue Oct 21, 2024 · 1 comment

Comments

@justin-tsai
Copy link

Hi, Unity 6 just released and I tried building my existing project with it but I get errors relating to this plugin when targeting Android. I think mainly due to the fact that Android: Java class UnityPlayer needs to be renamed to UnityPlayerForActivityOrService. Here are some examples

../Android/Prj/IL2CPP/Gradle/unityLibrary/src/main/java/net/gree/unitywebview/CUnityPlayerActivity.java:14: error: incompatible types: CUnityPlayer cannot be converted to UnityPlayerForActivityOrService
mUnityPlayer = new CUnityPlayer(this);
^
.../Android/Prj/IL2CPP/Gradle/unityLibrary/src/main/java/net/gree/unitywebview/CUnityPlayerActivity.java:15: error: no suitable method found for setContentView(UnityPlayerForActivityOrService)
setContentView(mUnityPlayer);
^
method Activity.setContentView(int) is not applicable
(argument mismatch; UnityPlayerForActivityOrService cannot be converted to int)
method Activity.setContentView(View) is not applicable
(argument mismatch; UnityPlayerForActivityOrService cannot be converted to View)

@KojiNakamaru
Copy link
Member

KojiNakamaru commented Oct 22, 2024

CUnityPlayerActivity was introduced for the Unity 5.6.x z-order issue. It is not necessary for other Unity versions, so I removed it from recent plugins since #1082 . Could you please try the latest binaries?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants