What is a GameObject (Unity Tutorial for Beginners)

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ก.ย. 2024

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

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

    🌐 Have you found the videos Helpful and Valuable?
    ❤️ Support on Patreon www.patreon.com/unitycodemonkey or get the Game Bundle unitycodemonkey.com/gamebundle.php

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

    why do I love this guy, not only does he love comments, made a very good tutorials, but also replies to our comments and questions! I respect this guy!

  • @munki87
    @munki87 6 ปีที่แล้ว +15

    Out of all the unity tutorials I've watched, this is one of the best, concise yet gives enough information to get started with GameObjects. Looking forward to the next one!

  • @redha5951
    @redha5951 4 ปีที่แล้ว +15

    I just have a question that i hope you'd answer, i really want to get into developing video games and i feel like there is no better time to do so.
    The problem i am having is that i have no idea where to start from, i would really appreciate it if you tell me what are the playlists i should watch and what to do exactly, also i love the content you provide us keep it up.

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

      If you're a complete beginner in Unity watch these videos to get acquainted with the engine th-cam.com/play/PLzDRvYVwl53vxdAPq8OznBAdjf0eeiipT.html
      After that try making a complete game like this th-cam.com/video/b5Wpni9KPik/w-d-xo.html
      Best of luck!

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

    after all that research, this are realy useful tutorials. Linking the entire playlist in the description makes ist even more enjoyable. Thank you!

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

    Although I already have experience with unity, watching your tutorial videos feels like learning again. It's going to help me to stay inspired on my project, and definitely you're earning a spot in the credits for it. Thanks for your work!

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

      I'm glad to hear it! Best of luck with your project!

  • @kunterkurt9464
    @kunterkurt9464 11 หลายเดือนก่อน

    Finally i did it! I complated the course and i have learned tons of things from you. I'm currently trying to change my proffesion and i hope one day i can be good game developer as such as you. I believe my self which is i can do this, i have been tried too hard and i developed myself. Now, my next target is find a good job related that field. Thanks for everything, you are not only a good game developer, also good teacher. With my sincerest regards.

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

      Congrats! I'm glad you learned a lot, best of luck in your game dev journey!

  • @guilhermebiolchi1179
    @guilhermebiolchi1179 4 ปีที่แล้ว +3

    Simple and direct to the point! Please continue making this series...

  • @rubenizquierdo9190
    @rubenizquierdo9190 5 ปีที่แล้ว +13

    well, new suscriber :D

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

    thank you so much i acc learn something after hours of searching and finding just uselessness i almost gave up i was acc about to cry thank you

  • @ahmadel-baher2779
    @ahmadel-baher2779 3 ปีที่แล้ว

    At 3:28 you created a new GameObject in the Start() function, and even without being assigned to a reference variable it was added to the scene. I was always under the impression that you needed to create a GameObject with "Instantiate()" in order to do that.
    So my questions are:
    - Does the engine automatically add newly created GameObjects to the scene?
    - Is there a fundamental difference between Instantiate() and simply creating a new GameObject?
    Also: great tutorial! Your videos are concise and they teach clean programming principles, keep it up!

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

      Yes doing new GameObject(); will add the object to the scene, you can't have a Game Object without existing in some scene.
      By doing new GameObject(); you create a completely empty Game Object without any components, doing Instantiate(); will clone the game object that you give it with all its components.

    • @ahmadel-baher2779
      @ahmadel-baher2779 3 ปีที่แล้ว

      @@CodeMonkeyUnity thank you responding, that was informative indeed!

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

    thank u for this video clear and simple

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

    Nice and straight forward tutorial. No unnecessary babbling ;)

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

    Thank you very much. I'm Russian😁

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

    thank u soooo much for these tutorials

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

    Nice!

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

    Thank you for your clear explanation.

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

    awesome tutorials.. thanks for your efforts ..( at last gogle AD helps to find you right source.. )

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

    Hey, thank you so much for all the tutorials you upload over the years. I just got started with this playlist, and I have a question. Can I run all of the scrips and commands on a single project file? Do they work togheter or I need to create separate project files for each one of them? Thanks!

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

      Not sure what you mean, you can have as many scripts as you want doing whatever you want.

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

    Man, Thank you. You really saved my day.!

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

    The best of the best... hope your udemy course is the same quality of this little tutorials ...

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

      Yup! Feel free to use the Q&A section if you have any questions!

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

    Is creating new Game Objects via scripts and assigning them new Components or even creating enemies this way, more productive and more performant?

  • @Stinger-rq4gy
    @Stinger-rq4gy 2 ปีที่แล้ว

    great video!
    In Unity, will one Empty Game object hold all my gun firing, gun idle, and gun reloading animations, for all my FPS guns, on the FPS AIO Controller? Also, where to attach this Empty Game object with all the animations in the hierarchy?
    In Unity, how should you order arms, guns, and an Empty Game object holding the guns animations in an FPS Controller in the hierarchy?

  • @BrainsEatZombies35
    @BrainsEatZombies35 6 ปีที่แล้ว +2

    Thank you!

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

    Thank you

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

    This may be stupid but I’ve only ever made vr games before slowly getting into 2d, one thing I really want to know is how you do your floors?

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

      Visually you use a Sprite Renderer and in terms of collisions you use a BoxCollider2D, is that what you mean?

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

    How do you make your game assets for the characters? I really want to know, please.

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

    Excelent.

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

    Could you make tutorial about android 2d settings (in unity), please?

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

      I'm not very experienced with android but the only main difference should be the the aspect ratio. Check out the video on How to set up a 2D Scene
      th-cam.com/video/Py8akSRnwuI/w-d-xo.html
      Cheers!

    • @jakub7117
      @jakub7117 6 ปีที่แล้ว

      Ok thanks :)

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

    This is pretty much the type of tutorial series I've been looking for! Amazing!
    [edit] now I've payed more attention and he doesn't cover much of the default components... ._.

  • @milovannovakovic2273
    @milovannovakovic2273 6 ปีที่แล้ว +2

    Not all components get disabled when you disable a game object, collieders never get disabled because of the OnEnter trigger

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

      Yes you are correct there are exceptions to that, since this video is meant to be for beginners I tried to keep it simple. Cheers!

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

    Hi .. thank you for this useful video.. but I have a question .. how can i make the car move without pressing any key?.. i want to play it and see the car movement in a straight line and then stop.. can you help me with this?

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

    Thank you for these fantastic tutorials for a Unity newbie! I had a question if you have the time; so when you add a Custom Component to the GameObject "Sprite" (3.00 mins) that creates a new GameObject "MyNewGameObject" in the Start() method, this MyNewGameObject should only exist while in Play mode?
    MyNewGameObject appears in the Hierarchy on pressing Play, and then disappears when I stop Play mode. Is this what is expected? And if so, why would you do this, over right-click > Create Empty in Hierarchy?

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

      Yes that game object gets created dynamically when that line of code runs and as soon as you start playing it gets destroyed since it was created dynamically.
      You would do this to create a game object through code, like if you want to instantiate a new Unit in an RTS game, you wouldn't start off with all Units created by default, you would make them as the player plays the game.

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

      @@CodeMonkeyUnity oh I see, thank you so much for that explanation, that clarifies things! 👍😀

  • @David-lc6vj
    @David-lc6vj 6 ปีที่แล้ว +13

    Awesome trailer, you bought me
    ps can you do a mobile tutorial, please

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

      ישראלי מה קורה

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

      mobile game tutorial or unity mobile version?

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

    nice

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

    Hi.Do we need to know a programming language in order to use Unity?And if the answer is yes which language?

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

      You can use Visual Scripting th-cam.com/video/qAkeCDWgPVA/w-d-xo.html
      Or write code in C#

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

      @@CodeMonkeyUnity Thanks

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

    should i experiment with the basics to get familiar with unity before doing actual game making?

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

      Sure, build a couple of small prototypes to get familiar with the engine th-cam.com/video/Vlcop0uxFIQ/w-d-xo.html

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

      @@CodeMonkeyUnity thank you so much!

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

    So, I have a GameObject structured like this:
    GameObject
    - Transform
    - Script
    In the script, how do I reference the GameObject?

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

      If it is attached to the gameObject, you just use the field "gameObject"
      For accessing the transform you do "transform"

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

      @@CodeMonkeyUnity That worked. Thank you!

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

    hi Code Monkey i don't have much idea about game coding , unity and c# should i start on this video ( i only know C language and i want to learn Game Development very well )

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

      Follow the complete basics playlist to get acquainted with the engine
      th-cam.com/play/PLzDRvYVwl53vxdAPq8OznBAdjf0eeiipT.html
      Then try following one of the complete games, Snake or Flappy Bird
      th-cam.com/video/b5Wpni9KPik/w-d-xo.html

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

    4:15 i dont have auto complete on his AddComponent pls help it will be so much easier to have that i was searching for extension but failed...

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

      Did you install visual studio separate from Unity? If so you can manually install the Visual Studio Tools for Unity docs.microsoft.com/en-us/visualstudio/gamedev/unity/get-started/visual-studio-tools-for-unity

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

    i would love to see unity fix that annoying random positioning bug, i mean, why they don't set it to 0, 0, 0. it's so weird that we have to do that every single time we create a new gameobject!

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

    Do I have to have any kind of basic knowledge about coding to learn something in this channel?

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

      I have many videos with different levels of difficulty, the videos covering the basics should be accessible to anyone
      th-cam.com/play/PLzDRvYVwl53vxdAPq8OznBAdjf0eeiipT.html
      I've also done a series doing a game from start to finish which is great for learning since it starts with a completely empty scene
      th-cam.com/play/PLzDRvYVwl53ucaUs0YGfyyKXdgqh5OtiK.html

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

      @@CodeMonkeyUnity I tried to repeat everything you've done in this video,I tried to create a dynamic game object through code,but it didn't work. (That might be because I called my object "monkeysoup" instead of "mygameobject") Also,I don't find a "Script" folder,just the "Assets" and "Packages" folders.

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

      @Lukes Modz oh

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

    I think it would have been more useful to show the spaceship art added to the game object dynamically as well. It seems incomplete.

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

    Hi,
    Does disabling a gameobject in your scene reduce the file size when it’s built?

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

      No, the object still exists, it's just not active

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

    and the project saved from this video can be downloaded from where?

  • @8978martin
    @8978martin 6 ปีที่แล้ว

    can you please teach us to make a comic reader in html that has a text box that indicates which page we are on and has buttons to go to the next and previous page and the last and final one

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

    When I type any word ( half word ) in vs code it doesn't show me any suggestions like your does
    What should I do?

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

      Install the Visual Studio Code package in Unity Package Manager, or VS Tools for Unity docs.microsoft.com/en-us/visualstudio/gamedev/unity/get-started/visual-studio-tools-for-unity?pivots=windows

  • @FF-ie6sd
    @FF-ie6sd 5 ปีที่แล้ว

    Hi, thank you for your great tutorial. I have some question about this video.
    After you used NEW GAMEOBJECT to create an empty object, you let (GAMEOBJECT MYGAMEOBJECT = NEW GAME....), why did you do that? Can't you AddComponent with "MyNewGameObject"? Do you have to use "MyGameObject?

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

      Not sure what you mean.
      This line creates a Game Object
      GameObject myGameObject = new GameObject();
      This line adds the SpriteRenderer component to the Game Object myGameObject
      myGameObject.AddComponent();

    • @FF-ie6sd
      @FF-ie6sd 5 ปีที่แล้ว

      @@CodeMonkeyUnity but i thought you already created an empty game object with "new GameObject();" , no?

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

      Yes you create a game object and then add a component to it.

    • @FF-ie6sd
      @FF-ie6sd 5 ปีที่แล้ว

      @@CodeMonkeyUnity oh! So the difference between "new GameObject();" and "GAMEOBJECT MYGAMEOBJECT = NEW GAME...." is the second code adds a component to the gameobject that you created with "new GameObject();". Correct? Just want to make sure, I am sorry for being pain in the ass lol

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

      @@FF-ie6sd Yup exactly

  • @thepactjr389
    @thepactjr389 6 ปีที่แล้ว +2

    how to make this plane or we make it in photoshop and etc.

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

      I draw my sprites in Photoshop but you can use any image program you want. Cheers!

    • @anaibrahim4361
      @anaibrahim4361 6 ปีที่แล้ว +1

      wich format you use to save the image
      png or what ?
      thanks in advance
      very good video

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

      Unity supports pretty much any file type so normally I use the Photoshop .psd's and sometimes convert them into .png's

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

    I am unable to drag my image to the Sprite field... there is just the circle with strikethrough tooltip when I try. I've tried with .bmp, .png and .jpg. I can't click the Sprite field either. Does it matter if I'm trying to do this in a 3D game?

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

      Make sure your Texture Import settings is set to Sprite

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

      @@CodeMonkeyUnity Thank you! This was the problem

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

    Hi Mr. Code Monkey
    I am having a problem in adding the C# code at the sprite that I have created
    It says that "Can't add script behaviour AssemblyInfo.cs. The script needs to derive from MonoBehaviour!"
    What does that mean?

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

      The script needs to extend MonoBehaviour in order to be added to a Game Object.
      So up top it needs to be
      public class MyClassName : MonoBehaviour {

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

      Code Monkey Thankyou very much I will see to your advice later. More power to your channel :)

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

    Thanks again professor. Launch more paid courses in Udemy, it's the only way I can return all your help.

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

    I still don't understand how to put my gameobject (that i draw) in unity. Please could explain to me?

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

      You just place the image file in your Assets folder.

  • @xxizirenaxx-8135
    @xxizirenaxx-8135 5 ปีที่แล้ว

    Can you use c++?

  • @200wonmoreexpensivesalt9
    @200wonmoreexpensivesalt9 3 ปีที่แล้ว

    i really don get the Mnonobehavior and its purpose. 😥

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

      It's the built-in class that enables you to make a script into a component

    • @200wonmoreexpensivesalt9
      @200wonmoreexpensivesalt9 3 ปีที่แล้ว

      @@CodeMonkeyUnity oh i see!
      Thank you so much for taking the time to clarify that for me 😊

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

    Help my gameobject is invisble

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

      Does it have a SpriteRenderer or MeshRenderer? Does it have scale > 0? Is it in front of the camera?

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

    Compiler error everytime, don't know what I'm doing wrong

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

      What error?

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

      @@CodeMonkeyUnity Thanks for the reply! I found a typo in my code. Problem solved :)

  • @wyattdickens3720
    @wyattdickens3720 2 ปีที่แล้ว +1

    yyeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeess

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

    Why the hell im here

  • @amitsu_edits4171
    @amitsu_edits4171 6 ปีที่แล้ว

    sorry i couldn't miss my chance to give this video first dislike

    • @amitsu_edits4171
      @amitsu_edits4171 6 ปีที่แล้ว

      but video is good

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

      Just... why?

    • @amitsu_edits4171
      @amitsu_edits4171 6 ปีที่แล้ว

      Code Monkey, sorry, I tried to be first at this at least :(

    • @FF-ie6sd
      @FF-ie6sd 5 ปีที่แล้ว

      @@amitsu_edits4171 you just have to let people know you are the one disliked this video do ya?

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

    Thank you!