iOS用のVuforiaのAR SDKを使っていて自分で作ったターゲットが全然機能せずはまったのでメモ。
当初こんな感じで書いていた
ImageTargetsAppDelegate.mm
// Provide a list of targets we're expecting - the first in the list is the default
[qUtils addTargetName:@"Stones & Chips" atPath:@"StonesAndChips.xml"];
[qUtils addTargetName:@"Tarmac" atPath:@"Tarmac.xml"];
[qUtils addTargetName:@"MyTarget" atPath:@"MyTarget.xml"];
でもこれだと最初の2つしか認識してくれない。
ところが以下で試してみると、うまくできた。
ImageTagetsAppDeleagate.mm
// Provide a list of targets we're expecting - the first in the list is the default
[qUtils addTargetName:@"MyTarget" atPath:@"MyTarget.xml"];
// [qUtils addTargetName:@"Stones & Chips" atPath:@"StonesAndChips.xml"];
// [qUtils addTargetName:@"Tarmac" atPath:@"Tarmac.xml"];
Targetの追加できる数とか限られていて、もしTargetを追加たければxmlに追記しろということなのかと思っている。ここら辺の数の制限とかも調べたい。
でもとりあえず、
僕はTargetを一つしか使うつもりはないので、これでも特に困らない。