Kind of hard to say from just the snippet… Also assuming that by the array inside the unity Editor stays at 0 you mean rawByteBufferAsync.
Can you give me a bit more info on how you are setting this up? When I try your code with a super basic script like this:
public ARImageDetectionManager _arImageDetectionManager;
public Texture2D someImg;
I can see that the _yetiImage is added, and I can access info from it. so yea need a bit more info on this.
Unfortunately, I was unable to reproduce the issue you are observing. I could detect Yeti and Crowd images as in the ImageDetection example. I also detected the Mock-Crowd image by copying that jpg to the same directory as Yeti.jpg or Crowd.jpg, creating Mock-Crowd.jpg.bytes file and using it as Reference Image Input (in ExampleManager Inspector window).
Pls Note: The image Detection example works only on APP, not in the unity editor. So please try to deploy your app to the device and point toward the image to be detected.
Also can you please confirm that you have targeted the image which you want to load within Unity as well as the code? Please refer to this Image Detection documentation.
If the issue still persists, please reply to this post with any log information you are seeing, any screenshots with error messages, or any other details that you may have which might help us to repro the issue.
When you say it only works on the app, does that mean I wouldn’t see the images in _arImageDetectionManager go up when adding them to that?
And also, if it only works in the app, why is there a Mock Image Anchor? Presumably you just mean the example you have built only works on the app, not that the whole image detection system doesn’t preview in editor?
I’ll try some more things out, but it sounds like you are confident something should be working my end, so I’ll keep trying.
Yes, as I mentioned earlier. No changes will show in the Unity editor because the image detection example scene only works on devices. Once you build an Image Detection scene on your device, you are able to detect an image with your phone camera and replace it with an AR asset.
Please see the attached screenshots for your reference.
Thanks for your feedback OK, so I will have to assume this works and try on the device. What was confusing is that you said that the example scene does not work on the editor but only on device? That’s fine, but it’s the ARImageDetectionManager that I am trying to get that to work (in another scene, not inside the example scene, although I was trying that as well of course) so to be clear, it’s not possible to see ARImageDetectionManager running in the editor?
The latest version of ARDK supports image detection in the unity editor, while the older versions do not. You can use the mock living room scene to detect yeti and crowd images. Here is the document for your reference.
The InspectorImage in the ARImageDetectionManager is used to provide a way to add reference images in the inspector, while the AddImage function call will not increase the array size.