How to make a Mana Bar in the UI (Unity Tutorial for Beginners)

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 พ.ย. 2024
  • Grab the Project files and Utilities at unitycodemonke...
    Let's create a Mana Bar in the UI along with some simple Mana Regen code and then polish it with a animated texture.
    If you have any questions post them in the comments and I'll do my best to answer them.
    See you next time!
    Grab the game bundle at unitycodemonke...
    Get the Code Monkey Utilities at unitycodemonke...
    #unity3d #tutorial #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.
    You can see my games at www.endlessloopstudios.com
    --------------------------------------------------------------------
    Website: unitycodemonke...
    Twitter: / unitycodemonkey
    Facebook: / unitycodemonkey

ความคิดเห็น • 145

  • @CodeMonkeyUnity
    @CodeMonkeyUnity  5 ปีที่แล้ว +22

    Did you know about the RawImage component? What interesting things have you done with it?

    • @masterg6477
      @masterg6477 5 ปีที่แล้ว +2

      Learn more about raw images i dont use this ever i use every time image.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว +1

      What do you mean by Unity Type? Version? I'm using Unity 2018.3

    • @aishakhatoon325
      @aishakhatoon325 5 ปีที่แล้ว +1

      Hmm I am a beginner so I don't know

    • @mangapinches
      @mangapinches 5 ปีที่แล้ว

      My first time hearing about it! It's very useful, thank you.

    • @hamzamusani5500
      @hamzamusani5500 4 ปีที่แล้ว

      Trying it for the first time thank you

  • @HasanVurucu
    @HasanVurucu 5 ปีที่แล้ว +35

    thank you dude but just an advice, speeding up some parts is a really good idea for video timing but on some parts (especially creating elements on hierarchy) are hard to catch. I stuck on the creating mask part about 5 - 6 minutes. Thank you, anyway. Great work.

  • @Alexander_Meyer
    @Alexander_Meyer 5 ปีที่แล้ว +8

    For those that wants to use this with a healthsystem where current and max health is not between 0 and 1, you can convert those values by passing SetSize(maxHealth / currentHealth), that will normalize the value. Remember to have them as floats.

    • @yesveryprofesionalnameyes6055
      @yesveryprofesionalnameyes6055 4 ปีที่แล้ว +2

      It is a good idea to have them as floats but, because I am an intellectual, I cast them before division lmao.
      Please don't be like me.

  • @ArthurCousseau
    @ArthurCousseau 4 ปีที่แล้ว

    This is the ultimate tutorial!
    Worked with Unity for 5 years and still learned a thing with RawImage UV Rect and using ImageType.Filled Horizontal instead of using a Slider.
    Great tips!!

  • @SendarkWoW
    @SendarkWoW 5 ปีที่แล้ว +3

    Finally, a good tutorial on doing progress bars with something other than the basic sprite fillAmount approach, which, as you said, is way too simplistic. Would love to see some examples of what you can do with shaders for the UI as well as more tutorials on achieving more advanced UI effects just as this one - there's definitely not a lot of it out there.

  • @meghs91
    @meghs91 4 ปีที่แล้ว +2

    Excellent, It would be a great if bit slows down when speeding up the trivial task or put list of steps you perform in slide so absolute beginner can follow!

  • @ZorrroUK
    @ZorrroUK 4 ปีที่แล้ว

    Good lord, after 5 different energy/ health bar tutorials I have found one that works for me and looks good too

  • @rockerxplayz3201
    @rockerxplayz3201 5 ปีที่แล้ว +10

    Love your videos I finally made a game but small

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว +2

      Awesome! Everyone starts small, keep at it!

    • @vonhawk6474
      @vonhawk6474 5 ปีที่แล้ว +1

      Me to

    • @457Deniz457
      @457Deniz457 5 ปีที่แล้ว

      @@CodeMonkeyUnity Do you also release games? O.o :)

  • @ahmedthebest
    @ahmedthebest 5 ปีที่แล้ว +7

    What software you are using in screen recorder , video editing
    And what for video recording and modification

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว +2

      For recording I use OBS, for editing Premiere. And for the talking videos I use After Effects for the Audio Spectrum effect.

    • @nichdev
      @nichdev 5 ปีที่แล้ว

      Yeah for the audio you also probably think of audacity, it's great and free

    • @Attaullah.k1986
      @Attaullah.k1986 5 ปีที่แล้ว

      I am using Bandicam you should try

  • @maxdart
    @maxdart 5 ปีที่แล้ว +1

    alternatively you make your barMask a filled image and you can change the fill, just like before with the bar. Could be a bit easier.

  • @Xeratas
    @Xeratas 5 ปีที่แล้ว +3

    what happens to the animation @15:54? was that a cut in the video or is the animation resetting?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว +1

      Just a video cut, the animation is always smooth.

    • @Xeratas
      @Xeratas 5 ปีที่แล้ว

      @@CodeMonkeyUnity I see alright :)

  • @BlackHayateMX
    @BlackHayateMX 5 ปีที่แล้ว +3

    This is amazing!!! Thank you for the tutorial!!!

  • @2-_
    @2-_ 5 ปีที่แล้ว +1

    an actually good ad

  • @eenayeah
    @eenayeah 5 ปีที่แล้ว +3

    Good tutorial. Thank you very much.

  • @themirlabs
    @themirlabs 5 ปีที่แล้ว +2

    well timed i was just making health and shield bars.
    question if you have multiple units how do you get the ui bars over them or should i make an ingame bar.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว +3

      If you're making a game with multiple units like say a RTS I would create bars in the World instead of the UI.
      Otherwise you're constantly having to calculate World position into UI coordinates.

    • @themirlabs
      @themirlabs 5 ปีที่แล้ว

      @@CodeMonkeyUnity thank you ^.^ keep up the good work. im loving the vids. looking forward to the multiplayer update and you videos on that.

  • @Aezzyr
    @Aezzyr 4 ปีที่แล้ว +1

    i get an error that says "There is no argument given that corresponds to the required formal parameter 'amount' of 'Mana.GetManaNormalized(int)'
    Can you please help me with this?

  • @MinecraftGamerLR
    @MinecraftGamerLR ปีที่แล้ว

    I have a question. If this were to be called using a button on the keyboard (new input system), how could we stop it from repeating every frame?

  • @quangphonghtx7756
    @quangphonghtx7756 5 ปีที่แล้ว +2

    hello, i'm vietnamese

  • @moqam
    @moqam 4 ปีที่แล้ว

    If your edgerect is moving in the wrong direction, just add a - before your fill amount ( -barImage.fillAmount)

  • @DragonBud2490
    @DragonBud2490 4 ปีที่แล้ว +6

    I am relatively new to Unity, and I've had to stop at 0:45 to change the speed to 0.25x just to get the speed to look normal. With all due respect, why would you speed up important moments that take less than 5 seconds in real life just to save milliseconds? Leave the viewer the option to alter the speed of your video. By doing that yourself, it forces the user to stop, go back, change the speed, and play detective to figure out what they missed. I've had to replay the first and second minute of the video over five times on 0.25x because you've sped this up so quickly.
    The content is great. But the manner in which some of it is delivered is illogical and frankly obnoxious.
    Cheers.

  • @nandorbacso4625
    @nandorbacso4625 5 ปีที่แล้ว

    Why is it good to you that you advertises your channel everywhere and make videos for free?

  • @EyobBerhanu-be9rd
    @EyobBerhanu-be9rd 11 หลายเดือนก่อน

    Unity says “ArgumentException: The Object you want to instantiate is null” when I try to create the button. How do I solve this? And please reply

  • @itsdamu
    @itsdamu 3 ปีที่แล้ว

    Now how would I spend mana from my Skills script? im using the old Input system with a simple use skill on key press.

  • @existenceis
    @existenceis 5 ปีที่แล้ว +1

    How would this be done if you used a call to Start() instead of using Awake() like you did? Or, perhaps better asked, why did you make that change?

    • @existenceis
      @existenceis 5 ปีที่แล้ว +1

      also - love your videos, the speed/brevity is wonderful. thanks a bunch.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว +1

      It would work the same, Start(); get called right after Awake();
      Normally I put the initialization code of an object on Awake(); and on Start(); I add whatever connections I need with other objects.

  • @dani-vz3zz
    @dani-vz3zz 2 ปีที่แล้ว

    Hello,if i have my own UI(not the one from your code) how can i make it when click that button spend mana?

  • @hasankemalturk4416
    @hasankemalturk4416 3 ปีที่แล้ว

    This is not for beginners but thank you anyways :)

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  3 ปีที่แล้ว +1

      What part is it not for beginners? It's a very simple UI sprite, I cannot think of anything simpler.
      If you know the absolute basics you should have no problem following this tutorial
      th-cam.com/video/E6A4WvsDeLE/w-d-xo.html

    • @hasankemalturk4416
      @hasankemalturk4416 3 ปีที่แล้ว

      @@CodeMonkeyUnity What I meant was code part and maybe it's because of my inability :)

  • @dragonballz3686
    @dragonballz3686 2 ปีที่แล้ว

    I have a doubt sir. In my game, I am having a shooting bar. Which means , If I hold the shoot button, then the shooting bar gets decreased and if the bar is at 0 then the player should stop shooting. And the shooting bar regenerates. Problem is if I press the shoot button it is decreasing but it is not stopping to shoot. It is continuously shooting after bar is at 0 while holding the button. And I solved this problem by using setactive. But after that, another problem came, that is, if I press the button, it is not shooting after the bar is 0, yeah that's fine, but the bullets are only disabled, so it is creating many disabled bullets in hierarchy. What should I do sir plz 😥😥

  • @mangapinches
    @mangapinches 5 ปีที่แล้ว +1

    What is the purpose of normalization with the method GetManaNormalized() and what is the purpose of returning manaAmount / MANA_MAX?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว +1

      Normalized values help you use them in any scenario without knowing what the underlying min and max values are. So for example you can display the size of a Mana bar without having to know MANA_MAX.
      With a normalized value you can calculate whatever relative value you want.

  • @eldubaroos
    @eldubaroos 4 ปีที่แล้ว

    pls help how do i call the tryspendmana function from a key, like
    if(Input.GetKeyDown(KeyCode.T)){
    mana.TrySpendMana(30);
    }
    that is my exact code, yet it does not show up that i used any. =[[[[

  • @jodyclemons4235
    @jodyclemons4235 3 ปีที่แล้ว

    How do you attach the Mana bar to your Spells so when you shot a Spell it uses some of Mana bar ?

  • @ysftulek
    @ysftulek 5 ปีที่แล้ว +2

    thanks, this is so helpful

  • @yesilelma8434
    @yesilelma8434 3 ปีที่แล้ว

    I can't make border. It doesn't showing. Help me please. Thanks

  • @madikarlov6328
    @madikarlov6328 4 ปีที่แล้ว

    Thanks a lot, it helped!

  • @NorthstriderGaming
    @NorthstriderGaming 2 ปีที่แล้ว

    So the sizeDelta approach doesn't seem to be working anymore despite setting the achors to the left. It just starts resizing from the center instead so it's being squeezed instead of filled from the left.
    Edit: you gotta set the pivot point to 0 0 to make it work.

    • @kitsute1776
      @kitsute1776 ปีที่แล้ว

      Thanks, I was having the same problem and setting the pivot point to 0 0 on the Mask worked for me.

  • @Tarquillentte
    @Tarquillentte 4 ปีที่แล้ว

    Can this code be used simply like in the video, if the UI button "Spend Mana" is replaced by an action - say:
    if[canJump]
    {
    mana.TrySpendMana(20);
    }
    ?
    I've tried this for a while now with no results, and cannot seem to make it work. I have the mana bar in it's own script, and I'm referencing it to my movement script with
    Mana refScript;
    void Start()
    {
    refScript = GetComponent();
    }
    Right now, when (refScript.TrySpendMana(20);) placed into the jump-function it simply states "Object reference not set to an instance of an object".
    Do you know what's wrong?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  4 ปีที่แล้ว +1

      Mana is not a MonoBehaviour class so you cannot grab it with GetComponent();
      You need to instantiate the Mana class somewhere and pass it in to your player script and also to the bar to update the visual.

    • @Tarquillentte
      @Tarquillentte 4 ปีที่แล้ว

      @@CodeMonkeyUnity Well, it appears then that there is a solution to this mystery! However, now I'll need to figure out what you just wrote, hehe. (There is a reason I'm in a beginner tutorial here).
      Actually posted about this to your Discord as well, but thank you immensely for taking the time to answer me!

  • @bornagain2024selah
    @bornagain2024selah 5 ปีที่แล้ว +1

    really appreciate your videos but i wish you wouldnt move so fast

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว

      You can download the completed project files from the website and pause the videos if you want to follow along.

  • @riyadas9143
    @riyadas9143 5 ปีที่แล้ว +1

    What an amazing video !!

  • @siggz2229
    @siggz2229 5 ปีที่แล้ว

    Stuck @ around 11 min. I've set my barMask to anchor on the left side, but when I adjust the width it still shrinks from both sides towards the centre. What I do notice is that when you modify your anchor, the blue circle denoting object origin shifts position, but mine does not. Why is that?
    Don't know what I'm doing differently, and everything else is working well =(

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว +1

      It's not the anchor that you need to change, its the pivot. Hold shift when clicking on the button.

    • @siggz2229
      @siggz2229 5 ปีที่แล้ว

      @@CodeMonkeyUnity you're a champion! I'll try that as soon as I get home 🐒❤️

  • @hamzamusani5500
    @hamzamusani5500 4 ปีที่แล้ว

    Question. I have made the mana system as shown and it works. I also made a dash system in another script ,from the movement tutorial. Now I want the player to dash only when there is enough mana but I cannot come up with a solution. Pls help

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  4 ปีที่แล้ว

      First test if you have mana, if not do nothing, if you do then spend the mana and do the dash.

  • @nathanbustamante1525
    @nathanbustamante1525 5 ปีที่แล้ว +1

    How did you make that border 1:40? What is this sorcery?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว +1

      There's a Border image tinted in black that is slightly larger than the Background image.

    • @nathanbustamante1525
      @nathanbustamante1525 5 ปีที่แล้ว

      @@CodeMonkeyUnity, lol ok thank you. I also didn't have it anchored the same way so I didn't have the same fields exactly.

    • @SLEUR32
      @SLEUR32 5 ปีที่แล้ว +2

      I needed to do that simple border too and paused the video 50 times wondering what was going on xd

    • @plexor-dev
      @plexor-dev 5 ปีที่แล้ว

      @@SLEUR32 0.5 speed video xD

    • @1LegoAdventures
      @1LegoAdventures 4 ปีที่แล้ว

      This. 100% agree. I got it, but it took coming down to understand that the border was hidden behind to create the boarder.

  • @sovietonionisthebestonion3805
    @sovietonionisthebestonion3805 5 ปีที่แล้ว

    I use Monodevelop but it doesn't recommend any options during the scripting
    What should I do ?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว

      MonoDevelop is very old and I don't think it's Unity Supported anymore, install Visual Studio Community or Visual Studio Code and install the Unity Tools.

  • @mangapinches
    @mangapinches 5 ปีที่แล้ว

    After creating the UI > Image ("background") as a child of the ManaBar, when I set the Width and Height to 0 it fails to inherit from the parent object ("ManaBar") and I'm left with an empty rectangle with no color. Do you know what I am doing wrong?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว

      Make sure the RectTransform is set to extend on all sides. Anchor Min 0,0 and Anchor Max 1,1.
      When you do that and set the width and height to 0 it will extend to occupy the size of the parent.

    • @mangapinches
      @mangapinches 5 ปีที่แล้ว

      @@CodeMonkeyUnity Thank you! This solved the problem!

  • @JamesCauchi
    @JamesCauchi 5 ปีที่แล้ว

    Thanks for this. I admit that I got hopelessly stuck around 60 seconds in.
    I decided to get 'basic-fancy' and import a gradient box to serve as texture in substitute for the 1x1 pixel.
    Unfortunately it refuses to be linked to the Image (script) component in the inspector - and (1.5 hours later) I gave up and wrote this comment. ^_^;;
    It does accept to be linked to a Raw Image script component - but that has none of the convenient fill elements.

    • @JamesCauchi
      @JamesCauchi 5 ปีที่แล้ว +1

      With guidance the mystery has been solved! :c)
      The 'basic-fancy' image was imported as a raw image so all I had to do was to click the imported asset, - go to 'Texture Type' and select 'Sprite (2D and UI). Now I should be able to follow along with the tutorial properly! :cD

  • @haithem8906
    @haithem8906 5 ปีที่แล้ว

    why we separating the progress of the bar on the mana class instead of just do it on the main class

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว

      You should always keep your classes as decoupled as possible in order to keep your code clean to be easier to follow, understand and maintain.
      It also allows you to completely change how you display Mana without having to modify the underlying class at all, just change the visual.

    • @haithem8906
      @haithem8906 5 ปีที่แล้ว

      @@CodeMonkeyUnity true ,
      than you

  • @Creslin321
    @Creslin321 4 ปีที่แล้ว

    Is it okay if we use some of the assets from the project files in a game?

  • @M15TrT34b4g
    @M15TrT34b4g 5 ปีที่แล้ว +1

    Can i use this code for the base of a stamina bar?? help pls

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว +1

      Sure, this is just a visual, it can represent whatever you want in your game.

    • @M15TrT34b4g
      @M15TrT34b4g 5 ปีที่แล้ว

      @@CodeMonkeyUnity Thank you! :))

  • @otherworldly513
    @otherworldly513 3 ปีที่แล้ว

    where do u get the white 1x1

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  3 ปีที่แล้ว

      Just make it in any image program like Paint or Photoshop

  • @457Deniz457
    @457Deniz457 5 ปีที่แล้ว +2

    Uff I love it ! :D

  • @DanielOliveira-hs5pw
    @DanielOliveira-hs5pw 5 ปีที่แล้ว

    Hey I'm not using Code Monkey so to use my mana which in my case is turbo I used this:
    if (Input.GetKeyDown(KeyCode.X))
    turbo.TrySpendTurbo(20);
    But it doesn't work, also my bar starts at 0 instead of 100.
    Can you help me out?

    • @DanielOliveira-hs5pw
      @DanielOliveira-hs5pw 5 ปีที่แล้ว

      I also did the clamp

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว +1

      If your bar isnt changing do some Debug.Log's to make sure the underlying variable is indeed being modified when you do TrySpendTurbo and make sure the bar is updating with that variable.

    • @DanielOliveira-hs5pw
      @DanielOliveira-hs5pw 5 ปีที่แล้ว

      @@CodeMonkeyUnity Thanks it's working now

  • @ricouseofficial4377
    @ricouseofficial4377 4 ปีที่แล้ว

    Can you activate the "tryspendmana" with a key instead of a button ?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  4 ปีที่แล้ว

      Sure, it's just a function call, you can call it from anywhere

  • @ProtonicStudios
    @ProtonicStudios 4 ปีที่แล้ว

    Hi! First of all, great tutorial, as always. Second thing: in my attack script i need to make a condition that when the mana is at 40, the player can attack. But the problem is that i can't refer the manaAmount int in my if condition, and if i try, it gives me a NullReferenceException error. Obviously i referenced the mana script in my attack script.
    Here's my code:
    if (playerController.isGrounded && Input.GetMouseButtonDown(0) && stand.activeSelf && energyAmount >= 40f)
    {
    Attack();
    }
    Hope you can help me ;)

  • @ZuriPOL
    @ZuriPOL 5 ปีที่แล้ว

    isn't better to refill mana correctly in while loop?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว +1

      A while loop would fill the whole Mana in a single frame rather than over time.

  • @TheNamesJT
    @TheNamesJT 5 ปีที่แล้ว

    how would you make this degen? instead of regen

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว

      Instead of increasing on update you would decrease.

  • @bobthebuilder1717
    @bobthebuilder1717 9 หลายเดือนก่อน

    dude... cant even download the files because his website keeps telling me to validate my email when i already clicked on that link in my gmail and it said "User Already Validated"😮‍💨

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  9 หลายเดือนก่อน

      If the account is validated then you should be able to download the files, maybe log out and back in again?

  • @masterg6477
    @masterg6477 5 ปีที่แล้ว

    Thanks you

  • @MrPicklepod
    @MrPicklepod 5 ปีที่แล้ว

    Mine keeps saying "Object reference is not set to an instance of an object"

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว

      Sounds like you left some field null

    • @MrPicklepod
      @MrPicklepod 5 ปีที่แล้ว

      @@CodeMonkeyUnity I have no clue what that means, but I fixed it lol. When I get home hopefully I remember to put what fixed it here for others.

  • @Mario-xl6ii
    @Mario-xl6ii 5 ปีที่แล้ว +1

    i cant download this

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว

      Why not? What happens when you press the "Download Project Files" button?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว

      What error message?

  • @Nick-dh7mz
    @Nick-dh7mz 4 ปีที่แล้ว

    Can i connect it to my vfx effects wich i created?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  4 ปีที่แล้ว

      Not sure what you mean, sure you can add extra vfx on top of the bar

    • @Nick-dh7mz
      @Nick-dh7mz 4 ปีที่แล้ว

      @@CodeMonkeyUnity can tou connect thwm to quirk s?

  • @ssdubsmash332
    @ssdubsmash332 5 ปีที่แล้ว +1

    Hello bro .. Please download progress bar projects create bro

  • @foxzo9356
    @foxzo9356 5 ปีที่แล้ว

    good ad

  • @Random_Coffee_Cup
    @Random_Coffee_Cup 4 ปีที่แล้ว

    What is the mana?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  4 ปีที่แล้ว +1

      This can be used for whatever you want, could be mana or could be stamina

  • @alexhp1282
    @alexhp1282 5 ปีที่แล้ว

    How do u make a 1x1 texture pixel?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว

      On any image program like Paint or Photoshop.

    • @alexhp1282
      @alexhp1282 5 ปีที่แล้ว

      @@CodeMonkeyUnity oh thx :)

  • @epkegaming3139
    @epkegaming3139 5 ปีที่แล้ว

    Why is this an add?

  • @georgilegend2935
    @georgilegend2935 5 ปีที่แล้ว

    Hello when I learn to work with your program can i make my own games?

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว

      Unity is the game engine and yes you can make your own games with it.

    • @georgilegend2935
      @georgilegend2935 5 ปีที่แล้ว +2

      Ok bye

  • @manicmillennial3287
    @manicmillennial3287 5 ปีที่แล้ว +1

    3rd Thank you CM!!

  • @jieluo840
    @jieluo840 5 ปีที่แล้ว

    nice tks

  • @sunareii
    @sunareii 5 ปีที่แล้ว

    *can I do this on mobile*

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว

      Sure, there's nothing different about mobile regarding this UI element.

    • @sunareii
      @sunareii 5 ปีที่แล้ว

      @Code Monkey ahh thanks

  • @Attaullah.k1986
    @Attaullah.k1986 5 ปีที่แล้ว

    I liked your video but it must be a little difficult for beginners because just for a loading bar bunch of code no way

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว +1

      It all depends on how detailed you want your bar to be.
      At it's simplest form it's just one line of code to set the bar size
      barImage.fillAmount = barSize;

  • @tenminutetokyo2643
    @tenminutetokyo2643 5 ปีที่แล้ว

    DOOD!

  • @candostyavuz8360
    @candostyavuz8360 5 ปีที่แล้ว +1

    I couldn't understand anything because of irrational timing decisions of the video. For example, masking operation is the most important part to complete the task but eventhough I watched it in 0.25 speed hundreds of time, I still couldn't figure out the complete opreration. Boooooo

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  5 ปีที่แล้ว +1

      At 10:30 the video is at normal speed as I explain how all the elements are set up. You have a game object with a Mask and a Image then a child of that game object with the bar sprite.

    • @candostyavuz8360
      @candostyavuz8360 5 ปีที่แล้ว

      @@CodeMonkeyUnity Yeah but for example the process which you properly put anchor points of the mask and bar is still blurry for me. It has been 3 days I am trying to understand why left anchor attached bar sprite halves when you change aspect ratio, lets say 9:16 to 16:9. You managed it somehow and shared the codes thanks for that of course. But I just wanted to make a feedback for your future works.

    • @candostyavuz8360
      @candostyavuz8360 5 ปีที่แล้ว

      I mean you used stretched anchors for every other canvas object, except mask and bar. And when I change the aspect ratio, everything fits perfectly well except mask and the bar.

  • @fallendragun
    @fallendragun 5 ปีที่แล้ว

    Hii

  • @morgansurname6544
    @morgansurname6544 4 ปีที่แล้ว +2

    Terrible tutorial. No idea why you'd need to speed certain sections up so quickly. Really makes the tutorial much harder to follow. We have the option to speed to video up ourselves.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  4 ปีที่แล้ว

      You also have the options to slow down the video and pause it when needed.
      This is your learning journey, its not a race, so take your time and focus on learning.

    • @morgansurname6544
      @morgansurname6544 4 ปีที่แล้ว +1

      @@CodeMonkeyUnity Use your brain. Leave the video at a constant speed and it's much easier to follow/change to what speed I want. You constantly changing the speed of the video is jarring and very poor for a tutorial which is why you never see this behaviour in other tutorials. Also, read the comments. I'm not the only one complaining. The first rule about making good tutorials is to not over assume knowledge of the person watching.

  • @Decnop08
    @Decnop08 4 ปีที่แล้ว

    Man, You are going WAY too fast. Can't Follow up.

    • @CodeMonkeyUnity
      @CodeMonkeyUnity  4 ปีที่แล้ว

      You can use the options in the TH-cam player to slow down or pause the video.
      Remember your goal is to learn, so don't worry about trying to learn as fast as possible, pause as much as you need to understand the content.