Hi,
we have a rather complicated setup here, involving ImageTrackers and UserDefined Image trackers.
Quick overview: We have 5 scenes showing virtual worlds. To load them, we use Image/Userdefined Targets. Those Targets have initially no Content, but once they get tracked, they will load a corresponding scene. ARCamera and ImageMarkers are set to dontdestroy on load, thus remain in memory,
This worked all fine. But now we made one more Scene using Smartterrain (well, that would be the 5th scene, means including the new one we have 5).
This setup works if:
- game starts, initial scene with ARCamera and imagemarkers loads.
- we use our new image marker to start the Smartterrain scene first
result: everything works as expected.
BUT IF:
- another image marker (not smartterrain, just normal with extended tracking) is tracked first and its scene loads
- and after this we use the imagemarker for the scene using smartterrain
- then this scene will load, but smartterrain fails to start with "Starting Smart Terrain Tracker" and then constant debug Output "Could not start tracker.".
And really in this case there is no smartterrain tracking going on.
I am lost here, and cannot figure out what the culprit is. Can i somehow reset all trackers after the Smartterrain scene loads?
Because i can only explain this to me, because we use extended tracking in other scenes, and this might be not stopped in time.
App is already uploaded to itunes connect, and i just figured this right now. HEEEELPPPPP!
Allessandro, once again, thanks for your suggestion. I will play arround with this again.
However, since i stumble into things like that quite often i would like to ask for this:
I appreciate very much your affords supporting Unity and make everything as easy as possible. THATS GREAT! Everybody just hast to place some prefabs, set datasources and there you go! SUBERB! I wouldn´t want to miss this.
However, due to experience here are some thoughts:
- if i do something a little bit of the suggested approach of placing prefabs, use events and so on i easily run into problems like described in this topic.
- And this is just a guess:
People using Vuforia from scratch in for example in an ios App have to setup everything themselves (I guess). While that is cumbersome they are forced to learn about classes and their methodes and after a whle they know what they do (hopefully). However, since you made it so easy in Unity to set something up, i can assure you that the majority, including me, does not know what they are doing. And then in becomes incredibly hard to figure out how to do stuff right. Even worse, since Vuforia turned into a protected library, Unity developers can hardly dig into the framework.
Arising problems i try to solve like this.
- 1. As far as possible i dig around in Monodevelop, but that doesnt tell me much
- 2. look up he forum, if somebody had a similar problem as i have (but that results usually provide no answer, instead i happen to be the first to find a critical bug every now and then)
- 3. look into Vuforias Api reference. NOW, THAT IS RATHER HARD FOR ME, AS IN UNITY I DONT USE THIS. THERE ARE YOUR PREFABS AND SOME SCRIPTS, BUT THEY NEVER DEAL WITH MY SPECIFIC PROBLEMS.
Background: I am actually a graphic designer with medium programming background. I get along programming quite well. But sometimes i am lost and have no idea where to continue learning or how to solve those problems.
I think there are more guys like me, so i would suggest the following:
- A. Keep up your good work of making everything as simple as possible for unity.
- B. BUT, provide some Unity specific SCRIPTING examples dealing with things (besides your prefab stuff):
- change datasources, calculate cameradistance or target sizes, enable extended tracking per scene or trackable and disable others, same for smart terrain, change the world center mode and other camera settings at runtime, reset everything save(and fast), provide a best practice scripting example...
That´s just my sugesstion. I mean the current examples are to easy for me and my problems too hard to solve. There should be something inbetweeen.
Again, don´t want to bother anyone, those are just be suggestions on how to make intermediate Untiy Developers live easier.
And probably, those suggestions do not belong here :-)
PS: As i am not a native english speaker, please excuse my terrible way of expressing myself!