Unity3d with AR Foundation - How to Place Different Prefabs With AR Plane Detection?

  Рет қаралды 12,232

Dilmer Valecillos

Dilmer Valecillos

Күн бұрын

Few subscribers asked me if I could make a new video about placing different prefabs with AR Foundation, today I am releasing such video where I walk you through creating an UI feature that includes 3 different buttons, each button is assigned to a specific prefab, once the user selects a button the prefab used for instantiation gets changed which gives the user the ability to place different prefabs in planes detected.
** Find the source code in Patreon and support me if you can even if it is with one of the lower tiers as it helps me in bringing you more content - THANK YOU **
/ dilmerv
Watch the skeleton cubes video below to ensure you don’t miss what I demonstrated previously as I use the results to build the scene shown in this video.
• AR Foundation With Uni...
Recommended Unity Free Assets for today:
assetstore.unity.com/packages...
** Support me by Subscribing to the channel as it will help me in bringing a lot more content and also as a way to show your appreciation for the free source code provided above **
bit.ly/2NmnFMu
Get realtime indie development tips from me in Twitter
/ dilmerv
Subscribe to my indie development videos & game releases newsletter
www.dilmergames.com
Blog about Indie development and startup
www.dilmergames.com/blog

Пікірлер: 42
@saetbyeolkwon4602
@saetbyeolkwon4602 4 жыл бұрын
Thanks a lot!! Your tutorials are always helpful.
@dilmerv
@dilmerv 4 жыл бұрын
You are very welcome and if there is anything I don’t cover yet let me know :) have a great day !
@saetbyeolkwon4602
@saetbyeolkwon4602 4 жыл бұрын
I'm getting some errors tho...
@dilmerv
@dilmerv 4 жыл бұрын
Saetbyeol Kwon what errors ?
@saetbyeolkwon4602
@saetbyeolkwon4602 4 жыл бұрын
it says the prefab cannot be loaded. I've checked the name of my prefabs several times and it's exactly same.
@dilmerv
@dilmerv 4 жыл бұрын
Saetbyeol Kwon are you using my GitHub repository ? Also did you place the prefabs inside of the Resources folder with a sub folder called “Prefabs”?
@adiwijayakusuma2288
@adiwijayakusuma2288 3 жыл бұрын
Hi Dilmer, im just discover your channel. Thanks for the AR Foundation tutorials. Can i ask you ? Why there are no application test in the end of video?
@vmmi8215
@vmmi8215 4 жыл бұрын
My sensei, me as your loyal disciple come for your lesson as always
@dilmerv
@dilmerv 4 жыл бұрын
Hehe you are more than welcome and thanks for your cool feedback and for watching my videos :) my student !
@buildar8434
@buildar8434 4 жыл бұрын
Hey, great stuff. I wanted to ask how to change the prefabs of previously generated planes. I have been able to change prefab for new planes. But how to change for previously generated planes ?
@WarPigAUT
@WarPigAUT 4 жыл бұрын
Hey Dilmer, I really really enjoy watching your videos. You already helped me out a lot and i will share your videos and suggest them to everyone who is in this topic. Really good explanations and easy to understand for beginners in unity. But i got another question about unity: is it possible to load a prefab via the device filesystem? Like a fileupload in HTML? Or if this is not possible, is it possible to load a ressource via an external URL like a google drive link, dropbox or an API? Best regards
@dilmerv
@dilmerv 4 жыл бұрын
Thank you for your nice message and yes it can be done, for now I am just going to give you a URL as a reference but I will make a video about it very soon :) docs.unity3d.com/Manual/UnityWebRequest-DownloadingAssetBundle.html
@carlosfelipepuerta995
@carlosfelipepuerta995 3 жыл бұрын
I got a IOS AR foundation problem and I figure you may have an answer. I got an AR Foundation app that does ground placement of some models. However for Android I place Objects and regardless of the direction im looking the models face the intended direction (towards the player), but for iphone the models rotation depends on the direction im looking at and may end up rotating in the wrong direction. Any idea what I could do to alliveate this without writing custom code for IOS, ( I know it wouldnt be much but still)
@All_About_Portfolio
@All_About_Portfolio 2 жыл бұрын
I really enjoy your videos Dilmer! Can u make a video on AR shooting game.. like spawning enemy around..!
@dilmerv
@dilmerv 2 жыл бұрын
Thank you 🙏 and I will definitely consider your suggestion !
@pranjalshah7985
@pranjalshah7985 4 жыл бұрын
Hey this is great video and you make nice tutorials.. I am working on ar ring try-on project so can you help me with how can I achieve hand tracking and rotation in ar without any hardware. Thank you
@dilmerv
@dilmerv 4 жыл бұрын
Hey man not sure what you mean without hardware? Can you explain what your setup would look like?
@pranjalshah7985
@pranjalshah7985 4 жыл бұрын
@@dilmerv I am trying to do it with mobile application. And by without hardware I meant without external hardware like intel real sense or external camera.
@pranjalshah7985
@pranjalshah7985 4 жыл бұрын
great video tutorial.. just a question How can I destroy all other objects and spawn only one model on button click?
@dilmerv
@dilmerv 4 жыл бұрын
Take a look at all the examples in my GitHub repo and you can modify them to fit your needs github.com/dilmerv/UnityARFoundationEssentials
@pranjalshah7985
@pranjalshah7985 4 жыл бұрын
@@dilmerv Thanks buddy.. But How can I destroy the initiated object.. I tried gameobject.SetActive(false); but it didn't respond can you help me with that.
@saetbyeolkwon4602
@saetbyeolkwon4602 4 жыл бұрын
Hi Dilmer! One more question. How can I remove the prefabs I've instantiated when I click another button? If I touch "Set ARBlue" then touch "ARGreen", can ARBlue prefab be removed automatically?
@dilmerv
@dilmerv 4 жыл бұрын
You can do a Physics.Raycast and use the hit object to determine which object needs to be removed.
@franciscocriscuolo6350
@franciscocriscuolo6350 4 жыл бұрын
Nice Dilmer! Just a question... The new AR Foudation 3.0 can recognize face expressions to trigger events? You have a video for arkit but not for android. Its the same?
@dilmerv
@dilmerv 4 жыл бұрын
Yes it can with few additions of code :) I will do a video about it soon ! Thanks for watching !
@franciscocriscuolo6350
@franciscocriscuolo6350 4 жыл бұрын
@@dilmerv Nice! im looking forward that video and the one with the cloud anchor! Keep the good work!
@dilmerv
@dilmerv 4 жыл бұрын
Thank you !
@elif-du2mf
@elif-du2mf Жыл бұрын
What is the game object called the plane visualizer? ı made the game and the buttons are functioning but no prefabs are spawned :(
@dilmerv
@dilmerv Жыл бұрын
I recommend checking out this repo as some of the newer components are available here and it also provides a lot of examples: github.com/Unity-Technologies/arfoundation-samples
@elif-du2mf
@elif-du2mf Жыл бұрын
@@dilmerv thank you so much for taking the time to reply all my frustrated messages ❤️ Im figuring it out slowly and ur videos are super helpful 🙏
@stevejhon9957
@stevejhon9957 4 жыл бұрын
Hi master, just one question, how to spawn just one prefabs and when click another button the previous prefabs got remove?? I see all example in your github but when i try it didn't work, sorry im new at this... Thank you for tutorial and sample 🙏
@dilmerv
@dilmerv 4 жыл бұрын
You could either destroy the previous object or you can check if the placement object already exist and not instantiate a new one.
@dilmerv
@dilmerv 4 жыл бұрын
You are welcome :)
@stevejhon9957
@stevejhon9957 4 жыл бұрын
@@dilmerv okay master, i will try and search again, thank you very much, have a good day master!
@slavhtrup4327
@slavhtrup4327 4 жыл бұрын
Hi, first to say - great work. Since I am new to AR I am trying to follow your tutorials from UnityARFoundationEssentials but I am getting those error when I try to build for Android: Failed to generated ARCore reference image library 'ReferenceImageLibrary' BuildFailedException: Failed to generate image database. Output from arcoreimg: stdout: ==== stderr: C:\Users\Slavy\AppData\Local\Temp\26b309eb32bf4fb4a43c1f023a87a4e5\c377c4cd2e374c5bbdec4fc2279558a3.txt:line 4: Not supported image format: Assets/ImageLibraryAssets/cardgym.JPG. ==== I get those errors on any scene ( ImageTracking ). What am I missing ?
@dilmerv
@dilmerv 4 жыл бұрын
Hello and thank you for your message, can you tell me which scene you are building ? I have a few in that project about image tracking.
@slavhtrup4327
@slavhtrup4327 4 жыл бұрын
I am shure I am doing something stupid ... but here are my steps. Unpack UnityARFoundationEssentials-master; Load it in Unity3d 2019.2.6; Change Buidsetting to Android; remove Vulcan API; Load scene ImageTracking from Scenes folder. Build and Run - and there are those errors. When i try deferent scenes - same errors. I even removed all scenes in "Scenes In Build" exept loaded scene.
@aihoang2881
@aihoang2881 4 жыл бұрын
@@slavhtrup4327 some imge is cardgym.JPG -> cardgym.jpg and change unitywhite.png by different image
AR Foundation Plane Detection Tutorial.
10:23
Augmented Reality Gaming
Рет қаралды 11 М.
One moment can change your life ✨🔄
00:32
A4
Рет қаралды 33 МЛН
WHO LAUGHS LAST LAUGHS BEST 😎 #comedy
00:18
HaHaWhat
Рет қаралды 23 МЛН
DEFINITELY NOT HAPPENING ON MY WATCH! 😒
00:12
Laro Benz
Рет қаралды 58 МЛН
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 10 МЛН
I Melted Wood With Friction
8:44
The Action Lab
Рет қаралды 974 М.
PhD AI student explains how China already have won in AI..
13:28
livinlavidaluke
Рет қаралды 61 М.
How To Setup Vuforia Ground Planes And Mid Air Placement
10:45
Dilmer Valecillos
Рет қаралды 15 М.
Generative AI in a Nutshell - how to survive and thrive in the age of AI
17:57
One moment can change your life ✨🔄
00:32
A4
Рет қаралды 33 МЛН