Placing 3D objects on a Unity canvas

  Рет қаралды 104,128

Tarodev

Tarodev

Күн бұрын

Ever wondered how to add a 3D object to your Unity canvas? This is great for screens like weapon select, inventories, skins, etc.
I see this question asked a lot so figured I'd make a quick tutorial on the matter.
❤️ Become a Tarobro on Patreon: / tarodev
=========
🔔 SUBSCRIBE: bit.ly/3eqG1Z6
🗨️ DISCORD: / discord
✅ MORE TUTORIALS: / tarodev
About Tarodev:
Develop video games like a pro!
Whether you're a beginner or a seasoned game developer, you'll find lots of useful tips and tricks to boost your development career. Visit the channel: / @tarodev

Пікірлер: 183
@Tarodev
@Tarodev 2 жыл бұрын
Helpful? *Let me know* so I can continue making useful content!
@BplusGames
@BplusGames 2 жыл бұрын
In Unity 2021 and with URP things are working a bit differently, but it helped me. Would love to watch more content of you :)
@artinstroukeprod
@artinstroukeprod 2 жыл бұрын
@@BplusGames Tell me, please, what different will be in URP case?
@kechaoou2695
@kechaoou2695 2 жыл бұрын
Very useful, thank you very much
@no_cap2499
@no_cap2499 2 жыл бұрын
@@artinstroukeprod not sure if you still need this but these instructions helped me for urp: 1.) In URP when you set your 2nd camera to Overlay you can use the Unity Layers as a culling option. Just put what you want to render on it's own layer and select that layer as the culling layer. 2.) Then add the overlay camera to the stack of the main camera, and remove the audio listener from the overlay camera. That is it. The overlay camera will now render anything it sees as a overlay, over the existing view. Just place your map here.
@no_cap2499
@no_cap2499 2 жыл бұрын
Yes please more content
@MyRapper34
@MyRapper34 3 жыл бұрын
For those who can't do it on URP, Unity has a tutorial called "Camera Stacking in Unity with URP! (Tutorial)" But still tutorial video thank you so much!
@Tarodev
@Tarodev 3 жыл бұрын
Thanks for the advice. Pinned.
@kolex023
@kolex023 3 жыл бұрын
Thanks! It's Helped!
@victordev3042
@victordev3042 2 жыл бұрын
Thanks!!!!! Worked for me!
@BinaryEmyaneh
@BinaryEmyaneh 2 жыл бұрын
Hope it works with HDRP, thank you for the advise :)
@richardvandusschoten1974
@richardvandusschoten1974 Жыл бұрын
Dude you are a wonderful human being, thanks
@FinlayWhitfieldGames
@FinlayWhitfieldGames 3 жыл бұрын
This was a really clear tutorial, well spoken and easy to follow. Thank you for taking the time to do this!
@simonesechi9286
@simonesechi9286 2 жыл бұрын
Straight to the point, slow enough to follow and fast enought to not take ages, i think i found the best unity dev youtube channel!
@mecsimoto7010
@mecsimoto7010 2 жыл бұрын
Please keep doing this kind of content, its kind of underrated the well explained and on point this mini tutorial was.
@byebyegiomar
@byebyegiomar 2 жыл бұрын
I like that you go straight to the point, no fluff.
@ianrob1201
@ianrob1201 2 ай бұрын
Amazing! I'd been trying all sorts of things and read / watched some other tutorials but they weren't really what I wanted. This is exactly it, setting the second camera was the big breakthrough that I'd just not even considered (I'm very new). Worked a treat.
@BinaryEmyaneh
@BinaryEmyaneh 2 жыл бұрын
Thank you, that worked wonderfully. Don't forget to stack your cameras by changing the Depth setting in output tab from 0 to 1 on your canvas camera
@Tarodev
@Tarodev 2 жыл бұрын
Glad it worked for you :) Happy coding
@maeo7792
@maeo7792 2 жыл бұрын
thanks so much
@rashidfarhan6223
@rashidfarhan6223 2 жыл бұрын
THANK YOU SO MUCH
@Blu3W4r10Ck
@Blu3W4r10Ck 4 ай бұрын
Perfect, solved my multiple cameras issue :)
@hurtigejler3264
@hurtigejler3264 2 жыл бұрын
So proffesional. Just straight to the point and simple!
@King-mj2bn
@King-mj2bn Жыл бұрын
Not sure if he points this out since I skimmed a bit but it's important to keep in mind that the mesh will not adjust scale properly according to screen size on the default Canvas setting. In the Canvas Scalar component on the Canvas, switch Constant Pixel Size to *Scale With Screen Size*
@windmas66
@windmas66 2 жыл бұрын
In case someone else watched this video, read the comments or other forum posts on the unity website, and is now thinking this doesn't work in HDRP, then proceeds to spend hours trying to use the compositor tool for HDRP. Don't waste your time, the above workflow works perfectly fine in HDRP. Thanks for the clear and quick tutorial.
@Tarodev
@Tarodev 2 жыл бұрын
Pinned. Thank you
@BinaryEmyaneh
@BinaryEmyaneh 2 жыл бұрын
Great thank you !
@dmitrywroclaw9165
@dmitrywroclaw9165 3 жыл бұрын
Great! Thank you very much! You save my game :) I was looking it year ago, but only now see so easy and effective totorial. Will use it :)
@dragonlute1903
@dragonlute1903 Жыл бұрын
I just stumbled across your channel trying to learn something for VR and holy crap man! Your tutorials are so good! I genuinely think you should be the next Brackeys
@joshuamiller7299
@joshuamiller7299 2 жыл бұрын
This is great, was trying to do this for so long, thanks!
@Maximple
@Maximple Жыл бұрын
This was exactly what I was looking for! I thought I would have to create a dozen of render textures, but this method is much better😂! Thank you!
@sandoceangames464
@sandoceangames464 2 жыл бұрын
I was just thinking how to put 3d objects (in case of my game: Cards) into "hand" and your video just popped up. It gave me great idea on solution to my problem. Thanks!
@tunghoang607
@tunghoang607 2 жыл бұрын
I learned so many things, thank you Tarodev
@JohnnyC_13
@JohnnyC_13 Жыл бұрын
Hey mate - clear, concise and very helpful. I am instantly a subscriber
@MatthewKimbrough0
@MatthewKimbrough0 2 жыл бұрын
Great info! I wish I would have known about this last year when I accomplished something similar using a lot of hacky and inefficient render textures.
@Thenineoh
@Thenineoh 2 жыл бұрын
Good stuff, exactly what I needed. Thanks!
@jehdiaizon
@jehdiaizon Жыл бұрын
Thank you! If anyone had troubles with object clipping when moving the 3d object forward, Change the Canvas Camera Object > Clipping Planes > Change the Near value
@7empest_mi
@7empest_mi 2 жыл бұрын
Thanks mate, helped a lot!
@kyalhuntley1883
@kyalhuntley1883 2 жыл бұрын
Love it. Straight to the point solved my problem 😊
@kyalhuntley1883
@kyalhuntley1883 2 ай бұрын
Tutorial is so good I came back to figure out what I did wrong on a new game lol.
@goblinganggaming680
@goblinganggaming680 4 ай бұрын
Insanely good tutorial, straight to the point, clear, thanks man
@PixelatedBeing
@PixelatedBeing 2 жыл бұрын
THIS IS AWESOME, THANK YOU
@psychologiagaming502
@psychologiagaming502 2 жыл бұрын
Cool! Clear and fast!
@durvids474
@durvids474 3 жыл бұрын
Great stuff! Thank you!
@GameJarne
@GameJarne Жыл бұрын
thank you! i needed this for a shop system :D
@lawrence4301
@lawrence4301 Жыл бұрын
This is great, I like it. Short and punchy.
@modiddymo
@modiddymo Жыл бұрын
Super helpful! Thank you kindly!
@pixeldustinteractive
@pixeldustinteractive 2 жыл бұрын
i was skeptical u were about to use rendertextures but this worked out way better, thanks
@abdellatifqassid4687
@abdellatifqassid4687 2 жыл бұрын
directly to the point, thank you
@El_Beat
@El_Beat Жыл бұрын
very useful and directo to the point, thank you very much
@_stephenhubbard
@_stephenhubbard 2 жыл бұрын
This should be the golden standard for how to create tutorials!
@ismail.cetinkaya
@ismail.cetinkaya 2 жыл бұрын
This so useful content. i'm really appreciate that
@lucbloom
@lucbloom 7 ай бұрын
Brilliant. Thanks mate
@vrmsali
@vrmsali 2 жыл бұрын
Second time in a day 😂 So ironic😊 This is yet another thing that i was trying to do on my splash screen UI/Canvas. Thank you again.
@r.iyushofficial5318
@r.iyushofficial5318 2 жыл бұрын
This helped a lot
@mathboy8188
@mathboy8188 2 жыл бұрын
Neat little trick. Thanks.
@owen7w7
@owen7w7 2 жыл бұрын
Oh!! it was so easy!!! I was like all right im gonna make a render and save it as a PNG and then use it as an image. But this is more convinient :) Thank you !!!
@GJERocks
@GJERocks Жыл бұрын
Couldn't see it in the game view until I messed with the Near Clipping Plane, so try setting the Clipping Plane: Near of the Canvas Camera to a negative value (-100 worked for me)
@EastCoastVandal
@EastCoastVandal 7 ай бұрын
Awesome! Just what I was looking for, going to use this to make a weapon customization screen that displays and allows the player to rotate the weapon while customizing it :)
@atk0l847
@atk0l847 2 жыл бұрын
thank you soo much you are a life saver
@kolex023
@kolex023 3 жыл бұрын
Thanks for the tutorial!
@Tarodev
@Tarodev 3 жыл бұрын
Good luck! :)
@tiebevermandel1895
@tiebevermandel1895 11 ай бұрын
Thankst it's saves my life. You're doing well
@alexmazureac8312
@alexmazureac8312 3 жыл бұрын
Thank you dude!
@manadody132
@manadody132 Жыл бұрын
you are the best ! thank you very much sir
@Visualsofkarthik
@Visualsofkarthik 2 жыл бұрын
Amazing on point
@TheTehnigga
@TheTehnigga Жыл бұрын
Thank you!
@zimi992
@zimi992 2 жыл бұрын
Amazing, thanks
@BlackJar72
@BlackJar72 Жыл бұрын
I wish I'd seen this earlier -- that would have good to know before getting an asset for basically photoing game object to make make pics for the UI.
@anodomaniD
@anodomaniD 6 ай бұрын
great video!
@chicao.do.blender
@chicao.do.blender 2 жыл бұрын
the type of content my adhd needs, learning unity in small steps is so hard because every part of the way there are details not to be forgotten about, learning something advanced like your tutorials allows us to be familiar with the workflow in order to get used to the notions like your very wise use of pre-created layers(UI Layer)
@marcc50
@marcc50 2 жыл бұрын
Thank you, you saved me.
@michelmilek2891
@michelmilek2891 2 жыл бұрын
Thank you very much!
@ITomocska
@ITomocska 3 жыл бұрын
Thank you, I was looking for this exactly! How do you not have more views?
@Tarodev
@Tarodev 3 жыл бұрын
So glad I could help you out! And for views... very rare and elusive it seems :P
@JensonTM
@JensonTM 2 жыл бұрын
damn, exactly what i was looking for
@atakanhobek5336
@atakanhobek5336 2 жыл бұрын
This man alwasy solve my problem. Thankss a lot...
@DerZeroHero
@DerZeroHero 5 ай бұрын
Got my like. thank you
@shirosurfer8864
@shirosurfer8864 2 жыл бұрын
Oh nice nice very interesting thank you
@Willskull
@Willskull 2 жыл бұрын
Thank you!!!
@LeRinse
@LeRinse Жыл бұрын
This is great! An important mistake not to do that I did initially, don't make your canvas camera a child of the canvas, otherwise your UI elements buttons text etc won't appear.
@TheNbc27
@TheNbc27 2 жыл бұрын
This is awesome! Exactly what I was looking for. What steps would it take after this to create a scrolling effect. I am trying to set up my games store like this. Essentially like Crossy Road where you can scroll left and right through the different skins and then you the one on the center of your screen is the one that is selected. EDIT: Honestly this might look really good if I just rotate the objects once selected, doesn't even need to scroll.
@halivudestevez2
@halivudestevez2 2 жыл бұрын
just what I needed. Now lets implement this :D
@halivudestevez2
@halivudestevez2 2 жыл бұрын
oupsz, I don't have clear flags...
@halivudestevez2
@halivudestevez2 2 жыл бұрын
Tip: if you make further tutorials, maybe you should change to some newer Unity version - you are using 2019
@PrincessSleepyTV
@PrincessSleepyTV Жыл бұрын
Thankii ♥
@Dark_Art_Space
@Dark_Art_Space 3 жыл бұрын
Good idea
@simsinnati6686
@simsinnati6686 2 жыл бұрын
Just in case anyone else gets stuck on this like I did: Don't forget to set your canvas to the UI layer as well, otherwise it won't be visible to the canvas camera.
@timdick5149
@timdick5149 6 ай бұрын
awesome!
@in2fractalout
@in2fractalout 2 жыл бұрын
supercool! thx
@NguyenHoangPhuong-qf6xb
@NguyenHoangPhuong-qf6xb 2 жыл бұрын
Brilliant
@MajinBuu45
@MajinBuu45 2 жыл бұрын
thank you sir
@rafaelskiarteportfolio1098
@rafaelskiarteportfolio1098 2 жыл бұрын
PERFECT
@rashidfarhan6223
@rashidfarhan6223 3 жыл бұрын
Liked and subscribed bro!
@Tarodev
@Tarodev 3 жыл бұрын
Appreciate it my guy
@alexraum8579
@alexraum8579 2 жыл бұрын
Very good content)))
@DavidB-rx3km
@DavidB-rx3km Жыл бұрын
If you're seeing the UI in the editor but not in game, change the Depth in the Camera settings so it's not 0 (1 or more).
@bolan11
@bolan11 Жыл бұрын
thanks!
@donkeymonkey4435
@donkeymonkey4435 3 жыл бұрын
Ohh , Man U r Great
@nakano15
@nakano15 2 жыл бұрын
I was wondering about this 2 days ago, when I was developing a settings menu. I was wondering how I could render a 3d object on the UI to show the effects of changing settings, and there it is, how I can do that. Thanks :D
@user-ht5lg6or1d
@user-ht5lg6or1d 9 ай бұрын
gracias ´me sirvio demasiado
@gamoe
@gamoe 2 жыл бұрын
thanks you
@waltermunozguaman7591
@waltermunozguaman7591 2 жыл бұрын
nice!!!
@Youthanasia131313
@Youthanasia131313 2 жыл бұрын
nice video
@leiafrench6631
@leiafrench6631 3 ай бұрын
Saving lives!
@pymns
@pymns Жыл бұрын
"Meow" at 0:49 btw, thanks helped me a lllllot.
@darkcognitive
@darkcognitive 2 жыл бұрын
Thanks for the tut!. What is the significance / need to add the cube to an empty parent object? Couldn’t you just have the cube itself and move / scale it instead?
@Banaaani
@Banaaani 2 жыл бұрын
Amazing stuff. I had a problem: all the 3D objects were black because I have black ambient color to make the world darker. However this was an easy fix with a directional light that is only used by the UI stuff.
@franklinlx2
@franklinlx2 Жыл бұрын
Would be interested in knowing how you created that orb 🙏
@why7893
@why7893 3 жыл бұрын
Thank you! Great tutorial, just what I needed. What about cinemachine based camera setups? Also this seems kind of inefficient, could it be setup in a way to only need to enable this camera when needing to view a 3d object?
@Tarodev
@Tarodev 3 жыл бұрын
Absolutely, although I'd say most games nowadays have a 2 camera setup (at least)... One for the world and one for canvas. The separation just makes it easier to develop in the long run. As for Cinemachine, I use it in most of my projects, but usually exclude it from my canvas camera and just use it on my world camera.
@PiNPOiNT2K
@PiNPOiNT2K Жыл бұрын
How would you approach being able to drag one of your 3D cubes from the UI into the world space (especially if technically its far away being rendered by the other camera)?
@tmacompanyli2795
@tmacompanyli2795 Жыл бұрын
It was a good source.
@no_cap2499
@no_cap2499 2 жыл бұрын
thnx
@thegrey448
@thegrey448 3 жыл бұрын
thank you. subs. 👍
@Tarodev
@Tarodev 3 жыл бұрын
Thanks for the sub!
@KDSBestGameDev
@KDSBestGameDev Жыл бұрын
I usually render it to a render target texture and use that in my ui
@DimasRC935
@DimasRC935 2 жыл бұрын
It doesn't work for me, the 3D object appear but not the canvas, i really dont know what to do
@reidondiesnatz8131
@reidondiesnatz8131 Жыл бұрын
Hello, how am I able to place text on top of the 3d object, as if I try this, the 3d model still appears first
@BlazeMakesGames
@BlazeMakesGames 2 жыл бұрын
I'm running into an issue where any 3D object for some reason acts as a sort of culling mask for my UI. Instead of showing up on the UI, it makes whatever part of the UI it would cover up, transparent. So like for example if I have a donut in my UI, the UI now looks like it has a donut shaped hole in it instead of actually showing the donut. I've been trying to fix this for hours and I have no idea what's causing it
@deraminator945
@deraminator945 3 ай бұрын
Will it be interactable when i add the button component to it?
@random_precision_software
@random_precision_software 10 ай бұрын
I need a 3d prefabricated coin moving towards the score text on the canvas. Can you do this please?
@Balakademi
@Balakademi 2 жыл бұрын
Thanks. i need different solution: my 3d object must come to UI and then must to go back to the 3d place. My bad solution: i made empty objects which aligned to UI object's view position. When needed im bringing 3d object to empty and then bringing back. (Because, Camera not moving so UI and 3d object can be seen at same view) But i have to change empty object's positions for different screen resolutions
@mrlevo27
@mrlevo27 Жыл бұрын
If I want to create a whole 3d screne as UI would that approach be performant? basically want to a box with 3d objects and every 3d object is a clickable ui element
@ejoflo
@ejoflo 2 жыл бұрын
Is there a way to anchor the 3D object to your UI similar to how the canvas works?
10 Things You NEED to Be Doing in Unity
11:40
Tarodev
Рет қаралды 129 М.
Unity UI Toolkit in 5 Minutes
5:47
MadCat Tutorials
Рет қаралды 117 М.
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 47 МЛН
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 8 МЛН
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 36 МЛН
Они так быстро убрались!
01:00
Аришнев
Рет қаралды 1,7 МЛН
How to Make a Good 2D Camera
11:38
Game Maker's Toolkit
Рет қаралды 394 М.
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,4 МЛН
How to Render 3D Objects on a Unity UI Canvas (Simple)
3:38
Max O'Didily
Рет қаралды 6 М.
Why The Windows Phone Failed
24:08
Apple Explained
Рет қаралды 121 М.
Coding Adventure: Portals
16:06
Sebastian Lague
Рет қаралды 1,3 МЛН
An introduction to Raymarching
34:03
kishimisu
Рет қаралды 130 М.
Making Minecraft from scratch in 48 hours (NO GAME ENGINE)
16:38
Unity async / await: Coroutine's Hot Sister [C# & Unity]
16:18
A new way to generate worlds (stitched WFC)
10:51
Watt Designs
Рет қаралды 520 М.
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 47 МЛН