By dd
on Wed, 06/20/2012 - 17:10
Hi..
I'm trying to display the QCARUnityPlayer in one part of the display.. basically it should do the same es suggested in here with the normal unityplayer (works fine)
[url]http://forum.unity3d.com/threads/98315-Using-Unity-Android-In-a-Sub-View[/url]
any ideas?
i would like to have the unity qcar at the top and a surfaceview at the bottom.
i tried smthg like:
[code]
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
surfaceView = (SurfaceView)findViewById(R.id.surfaceView1);
... etc.
}
[/code]
the qcar player is always in front and i can't see the surfaceview
thx a lot in advande..
Re: QCARUnityPlayer in Subview
Re: QCARUnityPlayer in Subview
Re: QCARUnityPlayer in Subview
Re: QCARUnityPlayer in Subview
QCARUnityPlayer in Subview
Have anybody accomplished this? I have the same scenario and I'm having the same error than dd.
Any help will be appreciated.
QCARUnityPlayer in Subview
Help Please!
Hello, I would like to show a button (Android Button) in front of my AR cam, and I can do it...
If I can't do the vuforia screen smaller, how could I put a Button in front of the screen?
Thank you!!
QCARUnityPlayer in Subview
After much trial and error, I got things working fine with a subview - actually it is a fragment inside an activity which has it's own view. This is in the fragment onCreateView:
QCARUnityPlayer in Subview
Nice, thanks for sharing this!
QCARUnityPlayer in Subview
I, too, have been trying to put the unity/vuforia into it's own fragment within a regular android activity. And I, too, am hitting noting but trouble. If at all possible, could you post the entire code for the fragment and main activity? Please??
QCARUnityPlayer in Subview
Cynthia, the code I posted goes in onCreateView of your Fragment.
The layout is simple - the unity_container is just a FrameLayout with match_parent for height and width. This is inside the root fragment layout which is also just a FrameLayout with match_parent height and width.
QCARUnityPlayer in Subview
NOTE (just tried): Given what I'm doing below (using getView() in place of view, and leaving the rootView return as is..i.e. inflate and return) I do get something now in the emulator.
QCARUnityPlayer in Subview
Sorry for the mistake. You are not being stupid. I said put the code in "onCreateView", but it actually goes in "onViewCreated". This method passes in the "view" parameter that I am using there.
QCARUnityPlayer in Subview
yes, success. Thank you grennis!
For those also trying this, follow the thread instructions but ADD the following information to the process:
Make sure, in the Manifest, that the activity that will be starting the app is NOT sending native events to dalvik, i.e.
QCARUnityPlayer in Subview
QCARUnityPlayer in Subview
Well, worked as you had it. There is still something I'm not getting, that is obvious, about how the qcar/unity setup works. If you've seen this before, any advice would be appreciated.
QCARUnityPlayer in Subview
Well, you know what? Doesn't really matter at this point if I can't get multiple side-by-side fragments, since I can do a complex fragment layout instead and see if that will work just as well.
QCARUnityPlayer in Subview
Hi,
Can you put your complete working code in github?
QCARUnityPlayer in Subview
Hi,
Sorry, right now I'm a little busy with other things. I don't have the time right now to strip down a sample. I will consider it later, but likely that's still a few months from now.
QCARUnityPlayer in Subview
do you know the steps please
do you know the steps please i need a help