Place UI Elements in your World! (Health Bar, Overlays, Timers)

preview_player
Показать описание
Let's learn how we can use UI Elements in the game using a World Space Canvas! 👇
👍 Learn to make awesome games step-by-step from start to finish.

🌍 Get Code Monkey on Steam!
👍 Interactive Tutorials, Complete Games and More!

If you have any questions post them in the comments and I'll do my best to answer them.

See you next time!

#unitytutorial #unity3d #unity2d

--------------------------------------------------------------------

Hello and welcome, I am your Code Monkey and here you will learn everything about Game Development in Unity 2D using C#.

I've been developing games for several years with 7 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.

--------------------------------------------------------------------

Рекомендации по теме
Комментарии
Автор

🌐 Have you found the videos Helpful and Valuable?

CodeMonkeyUnity
Автор

I kid you not when I say I literally was researching this topic a day before this videos release. Your timing is immaculate!

Sephta
Автор

Interestingly enough, it looks like literally everyone has been looking for this yesterday. Looking forward to more UI tutorials!

MohamedMagdy-qlpl
Автор

I literally needed this right now, thank you so much!

diogomuller
Автор

Omg. This is exactly what i need! I experimented with that yesterday! :P

pauls.
Автор

Your channel is getting better every day ! At the expense of my obsessive theme "Ways to Reference GameObjects" I mean: hook-up, FindObjectOfType, Singleton, ScriptableObject, Dependency Injection ... I hope you will add this either in a separate video, or in the advanced" C# "in " Steam". I think it will be useful for beginners to understand your code even better. Especially the methods you use in your code. Some things were not clear to me personally. Perhaps I missed something and did not see the explanation on this topic )))

arcday
Автор

Awesome Thanks CM again, This was a very helpful information

neozoid
Автор

So, I was watching your video and suddenly an ad came up. Guess what! it was an ad for your own course! You got an ad for your course in your own video XD
it's like paying yourself XD

anyway, thanks for such an awesome video.

muntasirchowdhrymridul
Автор

Figured out my own fix for the scaling issue, I set it to Screen Space - Camera, designed the UI and then set it to World Space, it fixed the issues I had with it.

MasterBroNetwork
Автор

Great tutorial)
I always used slider for healt bar, now i know about Fil Method in Image^^

_shon
Автор

Hello there, I'm having issues with world space canvas rendering. It's in a 3D game and it's rendering on top of everything. It's supposed to just be on a screen but when I leave the room it shows through everything. Can't think of anything to do to fix this, aside from not using UI materials. Any help?

DJMD
Автор

Sir I need some serious help in unity 3d health bar. I made health bars for enemy in unity 3d working perfect but the problem is with the size. Suppose I am looking at the enemy from a point and the health bar looks perfect but when the enemy comes near me the health bar size grows, I want to do something from which the health bar seems to just move and not getting larger on coming near the camera. I want it to look like its floating there but while coming near the camera its size increase and going away decrease. Can anyone help me if u understood?

vijayathaker
Автор

thank you very much its much simple that i excepted !

omar-
Автор

💬 Here's a simple video on a very useful feature.
For example I used this in making my recent Racing RTS for making all the UI in the game on top of the Player's car.

CodeMonkeyUnity
Автор

Hey there, nice approach on this! I was trying to replicate all that for a test but on my world space canvas sorting layer there was no "Top" or other options then "Default". I need to implement an onboarding where a 'hand' UI Image appears in world space to animate between two positions in a loop, but also to render in front of the other objects. That "Top" sorting layer would cover this? How did u set it? If not, do u know another way that i could implement this approach? Anyways, thanks for you content :)

RaulKFernandes
Автор

I think sprite objects has polygons in it, when you look at wireframe mode, so maybe that affects the performance. I'm not 100% sure thougb

kennysrael
Автор

I have 2 question. How would I manage the rotation so that le ui element is always facing the camera straight on. Secondly in the case of the wall I would always want the health bar to be between the wall and the camera and still shrink from view while walking away.

QvsTheWorld
Автор

Hi in the prefab editing mode the prefab is bright and looks as expected but on dragging the prefab model in to the 3d scene it becomes too dull! I think it is because of the lighting? Is that the only reason or is there anything else? Also one part of the model is darker than the other mostly due to lighting, could you please make some videos on 3d lighting and polishing the scene, I dont know anything about lighting....Also please suggest some quick tips and things that I have to follow to have a good lighting! Thanks !

sundarakrishnann
Автор

So i already implemented a WorldSpace health bar for my enemies. How can i reveal their position?
I just want to display a small icon above their head and i want that icon to not be blocked by GameObjects. It's kidna like a "object marker" thing which always visible regarding from the distance.

mrzaphkielYT
Автор

I have a problem, I have to create a smart glasses, I want to show ui wordspace of some people only in the glass of the glasses, I try to use sprite mask (but it works only with objects not with ui element) or ui mask (but it hides only the children of ui element with this component), how can I do this? sorry for my bad english

leonardocafissi