- Sort Posts
- 8 replies
- Last post
Re: How to create virtual buttons in unity3d
hey kim thanx . i found the virtual button prefab.
but now i am getting an error that
"Assets/Qualcomm Augmented Reality/Scripts/IImageTargetEventHandler.cs(12,33): error CS0246: The type or namespace name `TrackableScript' could not be found. Are you missing a using directive or an assembly reference?"
I dont know why its coming i have this TrackableScript in my scripts folder. how to resolve this??
Re: How to create virtual buttons in unity3d
It sounds like you are mixing old Beta 2 code with the new 1.0.0 code. IImageTargetEventHandler has been replaced by IVirtualButtonEventHandler, and TrackableScript has been replaced by TrackableBehaviour. Don't try mixing the old and new scripts, instead delete the entire Qualcomm Augmented Reality folder and import the new one. See the upgrade guide for more details:
http://ar.qualcomm.at/node/2000420
- Kim
There is Unity-specific documentation for Virtual Buttons on the SDK main page: http://ar.qualcomm.com
Getting Started - Unity Extension > Step 3: Mastering Advanced Topics > Using Virtual Buttons
Basically, you can drag the VirtualButton prefab onto an existing ImageTarget in your scene. Size and position the Virtual Button to your liking. Then, implement the IVirtualButtonEventHandler to handle the OnVirtualButtonPressed and OnVirtualButtonReleased callbacks. Drag this script onto your ImageTarget as well. Take a look at the VirtualButtons sample application for a sample implementation and setup.
- Kim