Unity in 100 Seconds

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
unity a cross-platform game engine for building 2d and 3d experiences made famous for democratizing the immense challenge of game development it was created in copenhagen denmark and first released in 2005. today it's the magic behind many popular games like the 2d among us the 3d monument valley augmented reality apps like pokemon go first-person shooters like escape from tarkov as well as interactive simulations and animations beyond the gaming industry the engine itself is written in c plus plus but allows developers to write their code in the more approachable c sharp in addition it provides a powerful graphical editor allowing you to draw shapes work with cameras and apply materials without having to write a single line of code every game object can have a variety of components like a mesh to define its actual physical shape a mesh renderer to apply materials and lighting to an object and physics components like rigidbody and colliders that simulate things like gravity and collisions in the real world and finally you can extend an object with your own c sharp code to make it do something interesting like take hit points when it runs into a bad guy to build your first video game right now install unity hub create a new project then open up the editor you'll be greeted with a 3d scene that contains a light source and a camera a scene is like a game level that you're developing while the camera is the point of view of the player to create a game of dodgeball let's add a plane to be the ground a cylinder for the player and a sphere for the ball select an object then hit y on your keyboard to move rotate and scale it to your liking hit the play button and notice how these shapes don't do anything but if we add a rigid body to the objects all of a sudden they're now impacted by the laws of gravity currently they look pretty boring but we can make them look cool by creating a material and then drag it onto the shapes and now to make this game playable let's add a script component to it and then open it in vs code it contains a class with two methods to implement your code start is called once at the very beginning of the game while update is called on every frame while the game is being played and there's also fixed update that runs at the same frame rate as the physics engine now to move our player around we can define a public property for the rigid body which contains a bunch of different properties and methods to move the object around now assign an actual value from the game to that property by dragging the rigid body component to it in the editor in the fixed update method we can first use input to detect when a user presses the arrow keys and then call the move position method on the rigid body to move it hit the play button and you should now be able to move your player around from there we can add a script to the ball that will add force to it when the game starts to roll it across the screen and we can also run code when the two objects collide by defining the on collision enter method congratulations you just built a video game this has been unity in 100 seconds if you want to see more short videos like this hit the like button and subscribe and let me know if you want to see a full unity tutorial in the comments thanks for watching and i will see you in the next one
Info
Channel: Fireship
Views: 1,123,951
Rating: undefined out of 5
Keywords: webdev, app development, lesson, tutorial
Id: iqlH4okiQqg
Channel Id: undefined
Length: 2min 45sec (165 seconds)
Published: Mon Mar 07 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.