Пікірлер
@engryfill9047
@engryfill9047 Ай бұрын
Prefab has missing scripts - both the GreenCar and RedCAr. After opening the prefab for the cars, I tried changing/assigning scripts, but there are no options to be selected. What to do?
@user-ve8sl9dm9t
@user-ve8sl9dm9t 6 ай бұрын
hi, may I know where you got your import objects/model?
@octe-en
@octe-en 2 ай бұрын
Yes sure, in the comments of the video, and the credits of the packages there are the links, and the author of such nice models
@xTUZONAx
@xTUZONAx 6 ай бұрын
Hi! When trying to build for the first time I receive an error asking to select the development team even thought is already selected. Do you have any idea how to fix it? I’m not able to find a solution
@octe-en
@octe-en 2 ай бұрын
I usually remove and add again my iCloud account to Xcode
@CamIsMac.
@CamIsMac. 9 ай бұрын
For those having the "BLACK SCREEN PROBLEM" you may have a "Vulkan" problem. Meaning in the Player Settings option - Scrool down to Graphics API's - remove Vulkan option ( Keep Open the GLES3) That Should fix your problem.
@franciscoestupinan2313
@franciscoestupinan2313 9 ай бұрын
Está genial el video 👌👌, te quería preguntar si tienes canal en español?
@octe-en
@octe-en 2 ай бұрын
Claro que sí. El canal es kzbin.info/door/lo1ePvAIPcpUTLKwMgalBA
@neilmalhotra3378
@neilmalhotra3378 10 ай бұрын
Great Video. but may I know why there is some jittering when your cars are spawn? I am having the same issue.
@octe-en
@octe-en 2 ай бұрын
it is because of the actual tracking, it might be improved in new ARFoundation versions hopefully
@imbcoffee
@imbcoffee 10 ай бұрын
Thanks for your tutorial, very helpful! I currently facing a problem, when I done the part about 4:23 everything works fine But when I moving to the 11:44 to do multiple image track and build my game to my android device, the game will crash immediately I've try two version of AR Foundation ( and Unity ), but both version also facing this problem 1: Unity 2022.3.0 + AR Foundation 5.0.7 2: Unity 2021.3.23 + AR Foundation 4.2.9 And the Scripting backend is already set to iL2CPP, also the Graphics APIs is only OpenGLES3 with Linear color space. Hope I can get some help, and sorry about my poor english.
@CamIsMac.
@CamIsMac. 9 ай бұрын
For those having the "BLACK SCREEN PROBLEM" you may have a "Vulkan" problem. Meaning in the Player Settings option - Scrool down to Graphics API's - remove Vulkan option ( Keep Open the GLES3) That Should fix your problem.
@mayank2564
@mayank2564 Жыл бұрын
What should i do if i want this project as WebGL. I tried switching platform and building it and when i run it, I get a black screen with prefabs hovering at the left side. I want to make a WebAR Project using this. Can someone help?
@octe-en
@octe-en 11 ай бұрын
I think AR foundation has no support for webGL. I suggest you to check device compatibility of AR Foundation first
@robgodfrey4515
@robgodfrey4515 Жыл бұрын
Here is the code for MultipleImagesTrackingManager.cs: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.XR.ARFoundation; using UnityEngine.XR.ARSubsystems; public class MultipleImagesTrackingManager : MonoBehaviour { [SerializeField] private GameObject[] prefabsToSpawn; private ARTrackedImageManager _arTrackedImageManager; private Dictionary<string, GameObject> _arObjects; // Get the reference of ARTrackedImageManager private void Awake() { _arTrackedImageManager = GetComponent<ARTrackedImageManager>(); _arObjects = new Dictionary<string, GameObject>(); } private void Start() { // Listen for any change in TrackedImageManager _arTrackedImageManager.trackedImagesChanged += OnTrackedImageChanged; // Spawn the game objects per image and hide them foreach (GameObject prefab in prefabsToSpawn) { GameObject newARObject = Instantiate(prefab, Vector3.zero, Quaternion.identity); newARObject.name = prefab.name; newARObject.gameObject.SetActive(false); _arObjects.Add(newARObject.name, newARObject); } } private void OnDestroy() { _arTrackedImageManager.trackedImagesChanged -= OnTrackedImageChanged; } private void OnTrackedImageChanged(ARTrackedImagesChangedEventArgs eventArgs) { // Identify the change on the tracked image foreach (ARTrackedImage trackedImage in eventArgs.added) { UpdateTrackedImage(trackedImage); } foreach (ARTrackedImage trackedImage in eventArgs.updated) { UpdateTrackedImage(trackedImage); } foreach (ARTrackedImage trackedImage in eventArgs.removed) { _arObjects[trackedImage.referenceImage.name].gameObject.SetActive(false); } } private void UpdateTrackedImage(ARTrackedImage trackedImage) { // Check tracking status of tracked image if (trackedImage.trackingState is TrackingState.Limited or TrackingState.None) { _arObjects[trackedImage.referenceImage.name].gameObject.SetActive(false); return; } // Show, hide, or position the GameObject on the tracked image if (prefabsToSpawn != null) { _arObjects[trackedImage.referenceImage.name].gameObject.SetActive(true); _arObjects[trackedImage.referenceImage.name].transform.position = trackedImage.transform.position; } } }
Жыл бұрын
Hi, is there a way yo updated Xr References Image Library With Adressble? I can download and update but library not working correctly when i update with adressbles (I use Ar foundation 5.0.7)
@myblueskyyy
@myblueskyyy Жыл бұрын
it is great!
@octe-en
@octe-en Жыл бұрын
Thank you
@jamie7546
@jamie7546 Жыл бұрын
*promo sm*
@MetaversoJuliXR
@MetaversoJuliXR Жыл бұрын
Great video, I have a question, how to unlock rotation in GameObject Spawned by Image Tracker? I am using Lean Touch to change Scale that is allowed but Rotation and Position are Locked.
@octe-en
@octe-en Жыл бұрын
There are different ways, but, since in the code we have track of the actual Car class of every spawned vehicle, you can just access to that class and make the rotation change even after spawned. I’m working in another tutorial but not finished yet about it
@4Malu4
@4Malu4 Жыл бұрын
Hi i followed you tutorial, but i don't know why the 3D objects don't spawn when i track the image, can you help me?
@jasonleigh4132
@jasonleigh4132 Жыл бұрын
Make sure the name used in the Reference Image Library is the same as the name of your prefab.
@alvarocaramesmorante2981
@alvarocaramesmorante2981 Жыл бұрын
Could you by any chance put the Script in the description or here in a comment? I'm trying to follow your steps but the script doesn't work for me (I definitely have some typo on the code). Thanks for the video!
@jasonleigh4132
@jasonleigh4132 Жыл бұрын
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.XR.ARFoundation; using UnityEngine.XR.ARSubsystems; public class MarkerTrackingManager : MonoBehaviour { private ARTrackedImageManager _aRTrackedImageManager; [SerializeField] private GameObject[] prefabsToSpawn; private Dictionary<string, GameObject> _aRObjects; private void Awake() { _aRTrackedImageManager = GetComponent<ARTrackedImageManager>(); _aRObjects = new Dictionary<string, GameObject>(); } void Start() { _aRTrackedImageManager.trackedImagesChanged += OnTrackedImageChanged; foreach(GameObject prefab in prefabsToSpawn){ GameObject newARObject = Instantiate(prefab, Vector3.zero, Quaternion.identity); newARObject.name = prefab.name; newARObject.gameObject.SetActive(false); _aRObjects.Add(newARObject.name, newARObject); } } private void OnDestroy(){ _aRTrackedImageManager.trackedImagesChanged += OnTrackedImageChanged; } private void OnTrackedImageChanged(ARTrackedImagesChangedEventArgs eventArgs) { foreach (ARTrackedImage trackedImage in eventArgs.added){ UpdateTrackedImage(trackedImage); } foreach (ARTrackedImage trackedImage in eventArgs.updated){ UpdateTrackedImage(trackedImage); } foreach (ARTrackedImage trackedImage in eventArgs.removed){ _aRObjects[trackedImage.referenceImage.name].gameObject.SetActive(false); } } private void UpdateTrackedImage(ARTrackedImage trackedImage){ // The name of the image target used in the Reference Image Library must // be the same as the name of the prefab in order to be able to associate // the image target with the appropriate prefab that will be displayed. if (trackedImage.trackingState is TrackingState.Limited or TrackingState.None){ _aRObjects[trackedImage.referenceImage.name].gameObject.SetActive(false); return; } if (prefabsToSpawn != null){ _aRObjects[trackedImage.referenceImage.name].gameObject.SetActive(true); _aRObjects[trackedImage.referenceImage.name].transform.position = trackedImage.transform.position; } } }