Placing 3D objects on a Unity canvas

Поділитися
Вставка
  • Опубліковано 4 жов 2024

КОМЕНТАРІ • 184

  • @Tarodev
    @Tarodev  3 роки тому +73

    Helpful? *Let me know* so I can continue making useful content!

    • @BplusGames
      @BplusGames 3 роки тому +1

      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 роки тому +4

      @@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 роки тому +91

    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 роки тому +8

      Thanks for the advice. Pinned.

    • @kolex023
      @kolex023 3 роки тому +2

      Thanks! It's Helped!

    • @victordev3042
      @victordev3042 3 роки тому +2

      Thanks!!!!! Worked for me!

    • @BinaryEmyaneh
      @BinaryEmyaneh 3 роки тому +2

      Hope it works with HDRP, thank you for the advise :)

    • @richardvandusschoten1974
      @richardvandusschoten1974 Рік тому +1

      Dude you are a wonderful human being, thanks

  • @BinaryEmyaneh
    @BinaryEmyaneh 3 роки тому +13

    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  3 роки тому

      Glad it worked for you :) Happy coding

    • @maeo7792
      @maeo7792 2 роки тому

      thanks so much

    • @rashidfarhan6223
      @rashidfarhan6223 2 роки тому

      THANK YOU SO MUCH

    • @Blu3W4r10Ck
      @Blu3W4r10Ck 6 місяців тому

      Perfect, solved my multiple cameras issue :)

  • @windmas66
    @windmas66 3 роки тому +4

    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.

  • @King-mj2bn
    @King-mj2bn Рік тому +7

    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*

  • @jehdiaizon
    @jehdiaizon Рік тому +1

    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

  • @byebyegiomar
    @byebyegiomar 2 роки тому

    I like that you go straight to the point, no fluff.

  • @simonesechi9286
    @simonesechi9286 2 роки тому +1

    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!

  • @chicao.do.blender
    @chicao.do.blender 3 роки тому +4

    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)

  • @FinlayWhitfieldGames
    @FinlayWhitfieldGames 3 роки тому +12

    This was a really clear tutorial, well spoken and easy to follow. Thank you for taking the time to do this!

  • @ianrob1201
    @ianrob1201 4 місяці тому

    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.

  • @mecsimoto7010
    @mecsimoto7010 2 роки тому +2

    Please keep doing this kind of content, its kind of underrated the well explained and on point this mini tutorial was.

  • @tiebevermandel1895
    @tiebevermandel1895 Рік тому +1

    Thankst it's saves my life. You're doing well

  • @sandoceangames464
    @sandoceangames464 2 роки тому +1

    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!

  • @_stephenhubbard
    @_stephenhubbard 2 роки тому

    This should be the golden standard for how to create tutorials!

  • @MatthewKimbrough0
    @MatthewKimbrough0 2 роки тому +4

    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.

  • @goblinganggaming680
    @goblinganggaming680 6 місяців тому

    Insanely good tutorial, straight to the point, clear, thanks man

  • @BlackJar72
    @BlackJar72 Рік тому +1

    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.

  • @kyalhuntley1883
    @kyalhuntley1883 2 роки тому +3

    Love it. Straight to the point solved my problem 😊

    • @kyalhuntley1883
      @kyalhuntley1883 4 місяці тому

      Tutorial is so good I came back to figure out what I did wrong on a new game lol.

  • @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

  • @GJERocks
    @GJERocks Рік тому +1

    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)

  • @Maximple
    @Maximple Рік тому +1

    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!

  • @lawrence4301
    @lawrence4301 Рік тому

    This is great, I like it. Short and punchy.

  • @EastCoastVandal
    @EastCoastVandal 9 місяців тому

    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 :)

  • @pixeldustinteractive
    @pixeldustinteractive 2 роки тому

    i was skeptical u were about to use rendertextures but this worked out way better, thanks

  • @El_Beat
    @El_Beat Рік тому +1

    very useful and directo to the point, thank you very much

  • @manadody132
    @manadody132 Рік тому +1

    you are the best !
    thank you very much sir

  • @hurtigejler3264
    @hurtigejler3264 2 роки тому

    So proffesional. Just straight to the point and simple!

  • @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 !!!

  • @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.

  • @7empest_mi
    @7empest_mi 2 роки тому +2

    Thanks mate, helped a lot!

  • @tunghoang607
    @tunghoang607 2 роки тому

    I learned so many things, thank you Tarodev

  • @ITomocska
    @ITomocska 3 роки тому +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

  • @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 :)

  • @GameJarne
    @GameJarne Рік тому

    thank you!
    i needed this for a shop system :D

  • @davegamedevelopment
    @davegamedevelopment 2 роки тому +2

    Thanks a lot!

  • @PixelatedBeing
    @PixelatedBeing 2 роки тому +1

    THIS IS AWESOME, THANK YOU

  • @JohnnyC_13
    @JohnnyC_13 2 роки тому

    Hey mate - clear, concise and very helpful. I am instantly a subscriber

  • @abdellatifqassid4687
    @abdellatifqassid4687 2 роки тому

    directly to the point, thank you

  • @r.iyushofficial5318
    @r.iyushofficial5318 3 роки тому +2

    This helped a lot

  • @lucbloom
    @lucbloom 9 місяців тому

    Brilliant. Thanks mate

  • @joshuamiller7299
    @joshuamiller7299 2 роки тому

    This is great, was trying to do this for so long, thanks!

  • @pymns
    @pymns Рік тому

    "Meow" at 0:49
    btw, thanks helped me a lllllot.

  • @marcc50
    @marcc50 2 роки тому +1

    Thank you, you saved me.

  • @LeRinse
    @LeRinse Рік тому +1

    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.

  • @atk0l847
    @atk0l847 3 роки тому +1

    thank you soo much you are a life saver

  • @kolex023
    @kolex023 3 роки тому +1

    Thanks for the tutorial!

  • @modiddymo
    @modiddymo Рік тому

    Super helpful! Thank you kindly!

  • @ismail.cetinkaya
    @ismail.cetinkaya 2 роки тому

    This so useful content. i'm really appreciate that

  • @TheTehnigga
    @TheTehnigga Рік тому

    Thank you!

  • @Thenineoh
    @Thenineoh 2 роки тому

    Good stuff, exactly what I needed. Thanks!

  • @mathboy8188
    @mathboy8188 2 роки тому

    Neat little trick. Thanks.

  • @zimi992
    @zimi992 2 роки тому +1

    Amazing, thanks

  • @shirosurfer8864
    @shirosurfer8864 2 роки тому +1

    Oh nice nice very interesting thank you

  • @durvids474
    @durvids474 3 роки тому +1

    Great stuff! Thank you!

  • @psychologiagaming502
    @psychologiagaming502 2 роки тому

    Cool! Clear and fast!

  • @DerZeroHero
    @DerZeroHero 7 місяців тому

    Got my like. thank you

  • @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

  • @tmacompanyli2795
    @tmacompanyli2795 Рік тому

    It was a good source.

  • @Visualsofkarthik
    @Visualsofkarthik 2 роки тому +1

    Amazing on point

  • @atakanhobek5336
    @atakanhobek5336 3 роки тому

    This man alwasy solve my problem. Thankss a lot...

  • @DavidB-rx3km
    @DavidB-rx3km Рік тому +2

    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).

  • @MajinBuu45
    @MajinBuu45 2 роки тому +1

    thank you sir

  • @JensonTM
    @JensonTM 2 роки тому

    damn, exactly what i was looking for

  • @anodomaniD
    @anodomaniD 8 місяців тому

    great video!

  • @nakano15
    @nakano15 2 роки тому +1

    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

  • @PrincessSleepyTV
    @PrincessSleepyTV Рік тому

    Thankii ♥

  • @leiafrench6631
    @leiafrench6631 5 місяців тому

    Saving lives!

  • @NguyenHoangPhuong-qf6xb
    @NguyenHoangPhuong-qf6xb 2 роки тому

    Brilliant

  • @Dark_Art_Space
    @Dark_Art_Space 3 роки тому +1

    Good idea

  • @alexmazureac8312
    @alexmazureac8312 3 роки тому

    Thank you dude!

  • @xkittencatx
    @xkittencatx 2 роки тому +1

    This worked really well for me. But how do you get around the 2 Audio Listener errors?

    • @Tarodev
      @Tarodev  2 роки тому +1

      Click your second camera and remove the listener component :)

  • @simsinnati6686
    @simsinnati6686 2 роки тому +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.

  • @rashidfarhan6223
    @rashidfarhan6223 3 роки тому +1

    Liked and subscribed bro!

    • @Tarodev
      @Tarodev  3 роки тому +1

      Appreciate it my guy

  • @DimasRC935
    @DimasRC935 2 роки тому +1

    It doesn't work for me, the 3D object appear but not the canvas, i really dont know what to do

  • @no_cap2499
    @no_cap2499 2 роки тому +1

    thnx

  • @franklinlx2
    @franklinlx2 2 роки тому

    Would be interested in knowing how you created that orb 🙏

  • @gamoe
    @gamoe 2 роки тому

    thanks you

  • @keithkutf
    @keithkutf 2 роки тому +3

    Thank you for the tutorial, I've successfully made a button with 3D object on it. Is there any way to mask it when it was scrolled out from a scroll view?

    • @hamedbabamohamadi9017
      @hamedbabamohamadi9017 2 роки тому

      Do you find a solution for this? I have this problem too.

    • @keithkutf
      @keithkutf 2 роки тому

      @@hamedbabamohamadi9017 Yes, I create a render texture and use a raw image to hold it, and another camera to target the render texture.
      Hope it helps

  • @donkeymonkey4435
    @donkeymonkey4435 3 роки тому +1

    Ohh , Man
    U r Great

  • @fajza
    @fajza 21 день тому

    Thank you for your video, you're amazing!!!

  • @softwareswv1981
    @softwareswv1981 2 роки тому +1

  • @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.

  • @KDSBestGameDev
    @KDSBestGameDev 2 роки тому

    I usually render it to a render target texture and use that in my ui

  • @thegrey448
    @thegrey448 3 роки тому +2

    thank you. subs. 👍

    • @Tarodev
      @Tarodev  3 роки тому

      Thanks for the sub!

  • @LUISAMARIA-x2g
    @LUISAMARIA-x2g 11 місяців тому

    gracias ´me sirvio demasiado

  • @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.

  • @in2fractalout
    @in2fractalout 2 роки тому

    supercool! thx

  • @rafaelskiarteportfolio1098
    @rafaelskiarteportfolio1098 3 роки тому

    PERFECT

  • @waltermunozguaman7591
    @waltermunozguaman7591 2 роки тому

    nice!!!

  • @reidondiesnatz8131
    @reidondiesnatz8131 Рік тому +1

    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

  • @me_leiko
    @me_leiko 11 місяців тому

    Hello! I know its been 2 years after this video, but it really helpful through now! Only one thing is optimisation, now in URP it's called "camera stacking" but problem is, each new camera, even if its rendering "nothing", cost unacceptable minimum 2ms on mobile, sometimes even more! I read forums on this bug, it definitely bug, many people check it up, in comparison built-in and URP. So do you know a different way to implement same feature? I appreciate you for help!🤗

  • @Balakademi
    @Balakademi 2 роки тому +1

    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

  • @lizkimber
    @lizkimber Рік тому

    the only thing i feel missed is how the UI camera knows to show as well as the main camera

  • @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?

  • @alexraum8579
    @alexraum8579 2 роки тому

    Very good content)))

  • @random_precision_software
    @random_precision_software Рік тому

    I need a 3d prefabricated coin moving towards the score text on the canvas. Can you do this please?

  • @joaocarlosp.p.6550
    @joaocarlosp.p.6550 Рік тому

    How to create this beautifull Sphere?

  • @shov3340
    @shov3340 6 місяців тому

    Update (URP) Unity 2022.3: UI Camera -> Render Type: Overlay. In MainCamera -> Stack -> Cameras: UI Camera

  • @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