Hey,
I found a lot of posts via google, but no one had a solution as it seems. I want to use the UnityPlayer inside a Fragment!
My View is a simple one with a RelativeLayout and a fragment inside, the fragment calls all necessary onPause etc. on the UnityPlayer. The important part is here:
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
mUnityPlayer = new UnityPlayer(getActivity());
// int glesMode = mUnityPlayer.getSettings().getInt(“gles_mode”, 1);
//boolean trueColor8888 = true;
//mUnityPlayer.init(glesMode, trueColor8888);
return mUnityPlayer.getView();
}
This doesnt work (with or without the slashes)… the fragment just stays black. The “normal” UnityPlayerNativeActivity works without problems.
The Unity Application uses Vuforia (if this is important)