AR Foundation Multiple Object Placement - Unity Augmented Reality/AR

  Рет қаралды 19,985

Dev Enabled

Dev Enabled

Күн бұрын

Consider supporting the channel on Patreon: / devenabled
Unity AR:
This playlist is a collection of tutorials covering Augmented Reality in Unity including ARCore, ARKit features with the use of Unity ARFoundation as well as the Vuforia plugin.
This Video:
In this video, we extend the plane placement logic to allow for multiple different objects to be placed and tracked at once. This covers creating a simple UI Canvas, adding additional prefabs and updating the input tracking logic.
Links:
Download projects from any complete tutorial series and more: mega.nz/#F!imQGFKgR!O0wu4xrnl...
Start of Unity AR Playlist: • Augmented Reality Play...
Unity Intro to AR: unity3d.com/how-to/create-AR-...
Android Device Install: docs.unity3d.com/Manual/andro...
Vuforia SDK developer.vuforia.com/downloa...
ARFoundation Git: github.com/Unity-Technologies...
Voxel Asset Downloaded here: maxparata.itch.io/voxel-space...
Get a FREE Pluralsight trial and support the channel: pluralsight.pxf.io/DevEnabled
My First Pluralsight Course: pluralsight.pxf.io/UnrealBlue...
My Second Pluralsight Course: pluralsight.pxf.io/UnrealCPPI...
My Third Pluralsight Course: pluralsight.pxf.io/UnrealFund...
Check out my Website: devenabled.com/
Twitter: / robbcreates
RECOMMENDED READING - Game Theory Books -
Theory of Fun for Game Design: amzn.to/2Y7a29z (Personal Favourite)
Game Feel: A Game Designer's Guide to Virtual Sensation: amzn.to/3159Dl5 (Another read I couldn't put down)
Level Up! The Guide to Great Video Game Design: amzn.to/2MkxcC8
The Art of Game Design, Second Edition: amzn.to/2JY6EVz
Rules of Play: Game Design Fundamentals: amzn.to/2YcfsA7
Game Programming Patterns: amzn.to/2YbXnC2
Drawing Basics and Video Game Art: amzn.to/2Ml6FVb
Sound Effects (BFXR): www.bfxr.net/
Get Affinity Designer: affinity.serif.com/en-gb/
Get Unreal: www.unrealengine.com/
Get Some great free assets here: www.gamedevmarket.net/ Gamedev.tv Courses - Affiliate Links:
Unreal C++ Developer: www.gamedev.tv/p/unreal-engin...
Unreal Multiplayer: www.gamedev.tv/p/unrealmultip...
Unreal Blueprints: www.gamedev.tv/p/unreal-bluep...
Blender Characters: www.gamedev.tv/p/blender-char...

Пікірлер: 45
@DevEnabled
@DevEnabled 4 жыл бұрын
In this video, we extend the plane placement logic to allow for multiple different objects to be placed and tracked at once. This covers creating a simple UI Canvas, adding additional prefabs and updating the input tracking logic.
@siddhantgautam4884
@siddhantgautam4884 4 жыл бұрын
Hey nice video . What if we want to instantiate multiple game objects at single click within the detected plane at random positions.Any kind of help will be appreciated.
@denahassani8517
@denahassani8517 3 жыл бұрын
@@siddhantgautam4884 Hi Siddhant This is exactly what I want to do and I am looking for a code or tutorial. I was wondering if you have been successful to do that. If so, I would be grateful if you can share code or give me any hint. Thanks :)
@han-gyeoljo2171
@han-gyeoljo2171 3 жыл бұрын
These are the best tutorials!
@vertexdesign2809
@vertexdesign2809 3 жыл бұрын
Wow. The most useful and well explained AR placement video I have seen. I can't type quite as quick :), but followed to the letter, and now understand how this works, and am spawning X-wing and Tie fighters all over my living room!! Excellent series. Can't believe I actually got this to work. Thank you so much.
@DevEnabled
@DevEnabled 3 жыл бұрын
Great to hear it's been helpful and I can't imagine there's much that beats a room full of x-wing and tie fighters. Glad to hear you could keep up.
@bilbostabbins1882
@bilbostabbins1882 3 жыл бұрын
Thank you so very very much for this I am going to try to implement selecting and repositioning each individual object and have a redo/undo system using the list Your tutorial is invaluable to me! Subbed
@user-vz4cl6cw4y
@user-vz4cl6cw4y 4 жыл бұрын
Thanks for the videos! It was really helpful.
@rustamtalibzade6989
@rustamtalibzade6989 Жыл бұрын
Thank you very much!!! You save me!
@HeadPack
@HeadPack 4 жыл бұрын
Happy to have discovered your channel. Enjoy the content of this series, the excellent narrative and voice over. I hope you can expand plane tracking some more. There are tons of image tracking tutorial videos out there, so perhaps that can wait a bit. Would be interesting to learn how to turn off the plane visualization once an object is placed, or how to change it from a polygonal shape to e.g. a consistent symbol. Maybe you could then expand a bit into ambient light and ambient reflections, aspects that help blend objects with the space they are projected on.
@DevEnabled
@DevEnabled 4 жыл бұрын
Thank you and thanks for the insightful ideas, it's really interesting to see what people think isn't being covered. I've already edited and scheduled the upload of this weeks video where I've moved onto Image tracking as I didn't get any real responses here :(. However, I'll be sure to try and loop back round to some of the plane tracking ideas you've suggested.
@HeadPack
@HeadPack 4 жыл бұрын
Dev Enabled thank you very much for considering these suggestions. Looking forward to your next videos.
@rustamtalibzade6989
@rustamtalibzade6989 Жыл бұрын
Thank you a lot!!!
@andyward7961
@andyward7961 4 жыл бұрын
Hi, thanks for the tutorial. I'm trying to spawn multiple objects and then select different objects, drag and scale them. I noticed that you showed how to do this in a previous tutorial however it seems that the code to do that was purposely removed here as it wasn't required as i understand. Thanks.
@calian8788
@calian8788 3 жыл бұрын
Hi, really great video but i have problem and was wondering if you have any ideas why it's not. Detection of the different prefabs work, but if i go back to image 1 per say the (image 1) object wont load again
@0GRANATE0
@0GRANATE0 4 жыл бұрын
Can we interact with the detected planes? Add rigidbody to the spaceships and let them hit the planes?
@elif-du2mf
@elif-du2mf Жыл бұрын
thank you so much! I was wondering if this would work with unity 2021? also with an updated AR foundation package of course.
@waynehome4061
@waynehome4061 4 жыл бұрын
I'm trying to do a multiple mouse click button, I want to click on a blank 2d dice so then it will be a dice 1 face, then click on it again and it will be dice 2 face and so on to dice 6 face. I've got it to click from blank to 1 but that's it. I'm not sure if there is something I have to do with the (On Click) option on UI button but I don't know what script to write if any? Any help or tips will be most appreciated. Thank You
@mnar786
@mnar786 3 жыл бұрын
How to instantiate two different model on same position either camera move or not, like I have a pad and and a drone with one button press pad arrived working but with another button press drone should arrive on same pad . Thanks
@arkhim9681
@arkhim9681 4 жыл бұрын
hi , i like your tutorial, is easy understanding. but i have struggle to change object that already placed on the plane to other prefab i need some help, please
@type90b
@type90b 4 жыл бұрын
great tutorials! any idea how to disable the plane finding visuals? I tried to switch out the ground plane prefab with one that has a clear material to no effect. Thanks!
@DevEnabled
@DevEnabled 4 жыл бұрын
Thank you. So if you look at the setup the plane manager is just a standard gameObject and the plane is just a custom renderer object. So you could either disable the object entirely when a plane is tracked or something, this would obviously cause issues as it would no longer be tracking planes. Or you could access the renderer and disable that. An approach you'd normally take for a quality app for designers or architects would be to allow the user to toggle the plane visualisation with a button or have it fade out over time using the renderer approach. Nothing here is really specific to AR you'd just need to Google how to work with Render assets with Unity in general. I have had some interest about these topics since posting this one so I did plan on returning to some improved plane tracking and things like that in the future, so that's just a brief overview until then.
@atsfft103
@atsfft103 3 жыл бұрын
Anyone have an idea to block the ray cast from going through the UI?? Thanks
@nemesisren7229
@nemesisren7229 3 жыл бұрын
Hey, how do I destroy spawned prefabs on touch? Please help me out
@ZacharyAghaizu
@ZacharyAghaizu 3 жыл бұрын
Thank you for this helpful series! Everything is working fine, but I'm getting this error message "ArgumentException: Index out of bounds. UnityEngine.Input.GetTouch". Should I ignore it?
@ZacharyAghaizu
@ZacharyAghaizu 3 жыл бұрын
FOUND THE SOLUTION :D - only change this //if(Input.GetTouch(0).phase == TouchPhase.Began) With if (Input.touchCount > 0 && Input.GetTouch(0).phase == TouchPhase.Began)
@arjunm1246
@arjunm1246 Жыл бұрын
Hi when I create the bool TryGetTouchPosition(arguments) it says 2 errors 1. CS0177 :The out parameter 'touchPosition' must be assigned to before control leaves the current method 2.CS0161 'ArObjectDetection.TryGetTouchPosition(out Vector2)': not all code paths return a value
@alexfaure6031
@alexfaure6031 4 жыл бұрын
Hi, how to delete precedent object for having just one by one objet ? tks !!
@kakuize
@kakuize 3 жыл бұрын
Hi Alex, Did you find out the answer to your question as I am after the same answer. Thanks
@IslamicKahani
@IslamicKahani 2 жыл бұрын
Please Answer I Need this Visual studio code file and I need it Urgent I'm waiting on your Respose
@elyarmohammadzadeh5565
@elyarmohammadzadeh5565 2 жыл бұрын
After I wrote the code encountered a null exception problem: NullReferenceException: Object reference not set to an instance of an object Can U help me?
@IslamicKahani
@IslamicKahani 2 жыл бұрын
NullReferenceException: Object reference not set to an instance of an object This IS not an Error This an Exception shown when you run this Code If you will Build an APK then this program will RUN if you have only this exception
@stevejhon9957
@stevejhon9957 4 жыл бұрын
But how to spawn just 1 object / prefab, and how to destroy previous prefab when you select another prefab button? Thank you for your tutorial...
@DevEnabled
@DevEnabled 4 жыл бұрын
Once you have the basic AR stuff running you just need to implement your standard Unity logic, there's nothing special going on, the prefab you spawn is just a standard GameObject so: Destroy(gameObject) whenever your programmed condition is met.
@stevejhon9957
@stevejhon9957 4 жыл бұрын
@@DevEnabled okay thank you, i will search about that, for me it's totally different to do that when using vuforia hahaha *imho
@DevEnabled
@DevEnabled 4 жыл бұрын
@@stevejhon9957 Yeah, Vuforia definitely has the benefit that it can all be more self-contained. But Vurofia or ARFoundation are both easy enough to get going if you already understand working with Unity. I can't remember the exact setup or the video I mentioned it in but I made a point of tracking the Prefabs we spawn and keeping an array of them so you just need to use that reference when the button is pressed and use the Destroy() call.
@laurisdupois8275
@laurisdupois8275 4 жыл бұрын
I had the same problem so I made a void called when i press on a "cleaning" button : foreach (GameObject gameObject in placedPrefabList) { Object.Destroy(gameObject); } placedPrefabList.Clear(); placedPrefabCount = 0;
@diegooriani
@diegooriani 2 жыл бұрын
Hi, where can I find the file for this project? Thank you in advance.
@IslamicKahani
@IslamicKahani 2 жыл бұрын
YES I have THIS project
@IslamicKahani
@IslamicKahani 2 жыл бұрын
Sir Can I Have this code ?
@MitchTheMarine
@MitchTheMarine 4 жыл бұрын
Just a heads up, I love your tutorials, but with my volume cranked up to its max I can barely hear you.
@DevEnabled
@DevEnabled 4 жыл бұрын
Sorry about that, have been working with a new room setup and trying to get the levels back to normal. Thanks for the heads up.
@emmet3690
@emmet3690 Жыл бұрын
hey if anyone is having trouble editing the textures of the spaceship, I found the following video pretty useful at the time mark 03:05 (kzbin.info/www/bejne/roDIoJeigbmrbsk) . I had to delete my prefab and just remake it after doing the process outlined in the linked video b/c it turned my original prefabs texture pink. After I did this though I was able to edit the material of the new prefab just fine
@arjunm1246
@arjunm1246 Жыл бұрын
Hi when I create the bool TryGetTouchPosition(arguments) it says 2 errors 1. CS0177 :The out parameter 'touchPosition' must be assigned to before control leaves the current method 2.CS0161 'ArObjectDetection.TryGetTouchPosition(out Vector2)': not all code paths return a value
AR Foundation Image Tracking - Unity Augmented Reality/AR
7:48
Dev Enabled
Рет қаралды 62 М.
The child was abused by the clown#Short #Officer Rabbit #angel
00:55
兔子警官
Рет қаралды 24 МЛН
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 3,9 МЛН
КАРМАНЧИК 2 СЕЗОН 7 СЕРИЯ ФИНАЛ
21:37
Inter Production
Рет қаралды 519 М.
How do non-euclidean games work? | Bitwise
14:19
DigiDigger
Рет қаралды 2,4 МЛН
I Made a 1D Game 🎮
11:18
Mashpoe
Рет қаралды 1,7 МЛН
AR Foundation Plane Tracking - Unity Augmented Reality/AR
11:39
Dev Enabled
Рет қаралды 22 М.
Using Image Recognition to DESTROY Fruit Ninja
10:08
CodeNoodles
Рет қаралды 597 М.
Coding INDOOR NAVIGATION with A* Pathfinding
10:24
MatthewHallberg
Рет қаралды 182 М.
The child was abused by the clown#Short #Officer Rabbit #angel
00:55
兔子警官
Рет қаралды 24 МЛН