- Home /
Unity ARCore with multiple prefabs
I'm trying to place 3d models on detected images. Placing one model is done, but still have problems, when image is detected. It places 2 times the model and when image is not detected it places the model on the side of screen (does not setActive false), in AugmentedImageVisualizer:
if (Image == null || Image.TrackingState != TrackingState.Tracking)
{
Model.SetActive(false);
}
I don't know how to set multiple models on different images. The prefab1 has one model and prefab2 has 7 models. If image1 is detected then place prefab1. If image2 is detected then place prefab2 on it and show only first model (out of 7). If prefab 2 model is pressed, it should change to the other model that is in prefab (and keep repeating model changes upon pressing them). Also I would like to rotate models in prefab 2. I don't know how to connect controller, visualizer(s) and prefabs. I'm using Unity 2019.4.1f1 and ARCore unity 1.17 sdk
Your answer
![](https://koobas.hobune.stream/wayback/20220613002131im_/https://answers.unity.com/themes/thub/images/avi.jpg)