I'm using the vuforia extension on Unity called User Defined Targets, but when i launch the sample app i have this kind of error:
- Sort Posts
- 7 replies
- Last post
Problem with User Defined Target
Problem with User Defined Target
Sorry, hadn't seen that yet.
Will do and report back, thanks!
Edit: works!
At first I had two errors (around IEnumerable<Trackable>), but I had to change the standard using System.Collections; to using System.Collections.Generic; and add a closing } at the end of the script.
And just to be sure, it's not unsafe/unstable or anything if I set the BuildNewTarget function to public?
Thanks again!
P.s. if we could have a similar vanilla example of the video texture, that'd be awesome!
Problem with User Defined Target
Check this article, which explains step by step what you need to setup UDT correctly:
https://developer.vuforia.com/forum/faq/unity-how-do-i-create-simple-udt-app
try to compare your setup with the one abpve, to see if you have missed anything.
Problem with User Defined Target
Hi,
I have a similar set-up and the same issue (don't want to clog up the forums with duplicate questions).
I'm using (or: trying to use) an NGUI button to trigger a new UDT. These are the steps I followed:
- Applied the UserDefinedTargetEventHandler script from the sample to the UserDefinedTargetBuilder object.
- Commented out some of the UI stuff that I don't need (e.g. Draw() and mNewUserDefinedTargetButton).
- Added an image target and referenced it from the UserDefinedTargetBuilder.
- Made the UserDefinedTargetEventHandler => BuildNewTarget() function public.
- Put a script on my NGUI element to call this function using public UserDefinedTargetEventHandler builder => builder.BuildNewTarget();
The nullReference error occurs on the line mTargetBuildingBehaviour.BuildNewTarget(targetName, ImageTargetTemplate.GetSize().x);
Which looks like it can't find the image target?
I've attached two screenshots of the links between the button, builder and target.
Any help would be appreciated.
Thanks
Attachment | Size |
---|---|
![]() | 51.57 KB |
![]() | 25.11 KB |
Problem with User Defined Target
Have you checked the Getting started guide?
This explains how to setup Vuforia and the samples:
https://developer.vuforia.com/resources/dev-guide/getting-started-unity-extension
Note: you need Unity 4.1 or higher (just in case).
I have a same problem in unity. but if you try to make a GUI button in sample app and if you don't make your own scene then you will not get any NullReference error.