<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abdullah Hamed</title>
    <description>The latest articles on DEV Community by Abdullah Hamed (@indiesaudi).</description>
    <link>https://dev.to/indiesaudi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F494414%2F1777d394-f708-4152-8519-779a7961c8b6.png</url>
      <title>DEV Community: Abdullah Hamed</title>
      <link>https://dev.to/indiesaudi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/indiesaudi"/>
    <language>en</language>
    <item>
      <title>Unity 106: Platforms and Builds</title>
      <dc:creator>Abdullah Hamed</dc:creator>
      <pubDate>Mon, 14 Dec 2020 17:21:06 +0000</pubDate>
      <link>https://dev.to/dotnet/unity-106-platforms-and-builds-3ndi</link>
      <guid>https://dev.to/dotnet/unity-106-platforms-and-builds-3ndi</guid>
      <description>&lt;p&gt;Now its time to build your game. To start building, you need to open up the build settings window. On the Unity main menu, choose File -&amp;gt; Build Settings. Select the Add Open Scenes button to add the scene that's open. You need to add all the other scenes you use in your game by dragging and dropping them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RiUBNDj---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4pjxqj291buukh3nqhot.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RiUBNDj---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/4pjxqj291buukh3nqhot.png" alt="unity build settings dialogue"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Switching Platforms
&lt;/h1&gt;

&lt;p&gt;By default, you'll see that the Platform is set to PC, Mac &amp;amp; Linux Standalone on the left. You can change the Target Platform by selecting the the platform you want to build for, then select Switch Platform at the bottom.&lt;/p&gt;

&lt;h1&gt;
  
  
  Building
&lt;/h1&gt;

&lt;p&gt;When ready, select the Build and Run button. Save the executable application anywhere you want it. The build process will start and the game will run in fullscreen when the build is done. To exit fullscreen, press Alt+Enter on windows, or cmd + f on Mac.&lt;/p&gt;

&lt;p&gt;You can get more information about &lt;a href="https://docs.unity3d.com/Manual/PlatformSpecific.html"&gt;supported platforms&lt;/a&gt; at the Unity documentation.&lt;/p&gt;

&lt;p&gt;Please check our full video covering this topic in our video beginner series for Unity.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/XQSOePLj5fI"&gt;
&lt;/iframe&gt;
 &lt;/p&gt;

&lt;p&gt;This concludes our Unity 101 series.&lt;/p&gt;

</description>
      <category>csharp</category>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>Unity 105: Debugging and Analyzing</title>
      <dc:creator>Abdullah Hamed</dc:creator>
      <pubDate>Thu, 10 Dec 2020 19:37:08 +0000</pubDate>
      <link>https://dev.to/dotnet/unity-105-debugging-and-analyzing-g00</link>
      <guid>https://dev.to/dotnet/unity-105-debugging-and-analyzing-g00</guid>
      <description>&lt;p&gt;Visual Studio IDE supports debugging Unity projects. On windows you can add Unity support from the Visual Studio installer by modifying your installation. Unity support is built-in into Visual Studio for Mac, and you do not need to modify your installation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0p1az6umb6b5nxx5xnjy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0p1az6umb6b5nxx5xnjy.png" alt="unity support in Visual Studio installer for windows"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Debugging
&lt;/h1&gt;

&lt;p&gt;Debugging enables you to freeze the execution of your script as any point you set using breakpoints. To set a break point, select the area in the margin of Visual Studio IDE next to the line you want the code to freeze at. A red dot should appear on that margin showing that a breakpoint has been set.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftuc9sg7eyicynpdqcwii.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ftuc9sg7eyicynpdqcwii.png" alt="a breakpoint with a red dot showing in the margin of visual studio"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To start the debugger, you need to have both Visual Studio IDE and Unity running. Select the Attach to Unity button at the top of the Visual Studio IDE.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5ssuhrcv5u06jq13v0re.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5ssuhrcv5u06jq13v0re.png" alt="Attach to Unity button in Visual Studio"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you were using Unity 2020 and up, Unity might ask you to enable debugging. Select Enable for this session or for all projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F27kc9zf3zl5jt5q9j8hj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F27kc9zf3zl5jt5q9j8hj.png" alt="Enable debugging dialogue in Unity 2020 and up"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Visual Studio Unity debugger should start and be ready and attached to Unity.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq5u998vcho63uf8255da.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq5u998vcho63uf8255da.png" alt="Unity debugger activated in Visual Studio"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, select the play button in Unity to run your game. One Unity reaches the line of your code, Unity will freeze. You will be able now to look at the debugger locals window and see properties of your code and game objects. You can hover on variables to see their value at that specific state, or you can dig deeper into the locals window at the bottom of the debugger to see them in a list.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F91o4mnj9h3ftm9qvdb4z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F91o4mnj9h3ftm9qvdb4z.png" alt="Visual Studio IDE with stopping at a Breakpoint"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please check our full video covering this topic in our video beginner series for Unity.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/EVi_2AQizus"&gt;
&lt;/iframe&gt;
 &lt;/p&gt;

</description>
      <category>csharp</category>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>Unity 104: Physics and Collisions</title>
      <dc:creator>Abdullah Hamed</dc:creator>
      <pubDate>Wed, 02 Dec 2020 18:25:40 +0000</pubDate>
      <link>https://dev.to/dotnet/unity-104-physics-and-collisions-5f9a</link>
      <guid>https://dev.to/dotnet/unity-104-physics-and-collisions-5f9a</guid>
      <description>&lt;p&gt;To understand physics in Unity, its important to understand 2 components, RigidBody and Colliders. Unity uses Nvidia's PhysX engine for 3D, and Box2D for 2D objects out of the box.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqhm73ivtrdkdgml5cqej.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqhm73ivtrdkdgml5cqej.jpg" alt="Unity engine with objects that have colliders on them"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  RigidBody component
&lt;/h1&gt;

&lt;p&gt;When adding a RigidBody component to a GameObject. It will start interacting with the physics engine. For example, gravity will start affecting the object and it will fall when the game runs. The physics engine runs much more frequently than the framerate of the game. Every time the physics engine takes a step, it calls the FixedUpdate() method in MonoBehaviours. It’s a good practice to put any calculations including physics in the FixedUpdate() method.&lt;/p&gt;

&lt;h1&gt;
  
  
  Colliders
&lt;/h1&gt;

&lt;p&gt;Adding a collider component gives the GameObject boundaries that collide with other objects with colliders in the scene. Adding a Colliders also activates these Unity messages in MonoBehaviors in objects with colliders:&lt;/p&gt;

&lt;h2&gt;
  
  
  OnCollisionEnter(Collision)
&lt;/h2&gt;

&lt;p&gt;This function will run once at the moment the collider collides with another collider. The Collider object passed to the method includes information about the collision, including a reference to the other GameObject that collider with this collider.&lt;/p&gt;

&lt;h2&gt;
  
  
  OnCollisionStay(Collision)
&lt;/h2&gt;

&lt;p&gt;This function will run continuously as long as the collision is still happening. A Collision object is also passed to it with information about the collision happening.&lt;/p&gt;

&lt;h2&gt;
  
  
  OnCollisionExit(Collision)
&lt;/h2&gt;

&lt;p&gt;This function will run once as soon as the collision stops. A Collision object is also passed to it with information about the collision that ended.&lt;/p&gt;

&lt;h1&gt;
  
  
  Combining RigidBody and Colliders
&lt;/h1&gt;

&lt;p&gt;If two objects with RigidBody components and colliders collide, they will react as you would expect 2 objects would interact in the physical world. Changing variables, such as Mass, in the RigidBody component will change the behavior of the GameObjects colliding.&lt;/p&gt;

&lt;p&gt;Physics can be fun to play with and a quick way to prototype a game, but they are also taxing on processing resources. Physics are also unpredictable. So if your game depends heavily on predictability, then physics might not be the right option for you. To learn more check out &lt;a href="https://docs.unity3d.com/Manual/PhysicsSection.html" rel="noopener noreferrer"&gt;Unity physics&lt;/a&gt; documentation.&lt;/p&gt;

&lt;p&gt;Please check our full video covering this topic in our video beginner series for Unity.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/IzUoR_76Mdo"&gt;
&lt;/iframe&gt;
 &lt;/p&gt;

</description>
      <category>csharp</category>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>Unity 103: Input</title>
      <dc:creator>Abdullah Hamed</dc:creator>
      <pubDate>Mon, 23 Nov 2020 20:51:07 +0000</pubDate>
      <link>https://dev.to/dotnet/unity-103-input-48ac</link>
      <guid>https://dev.to/dotnet/unity-103-input-48ac</guid>
      <description>&lt;p&gt;Games are interactive, right? Players need to be able to interact with the game, and you need to provide feedback to them. In this post I will teach you how to add Unity’s Input system package to your project, and how to use it in your C# script.&lt;/p&gt;

&lt;h1&gt;
  
  
  Installing the Unity Input system package
&lt;/h1&gt;

&lt;p&gt;To install any Unity package you need to open the package manager. You do that by opening the window drop down menu, then choose package manager. Search for input manager and install it.  Follow the prompts on the screen to use the new system. The process will restart your Unity project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1lykw1fg4nl79zhtidyc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1lykw1fg4nl79zhtidyc.png" alt="Unity's package manager with the input system highlighted"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the project restarts, lets create settings for your input. To do that, open the edit drop down menu, then choose project settings. Select Input System tab on the left, then click on Create Settings Asset. This will create a file that will contain your input systems.&lt;/p&gt;

&lt;p&gt;You can learn more about the input system and how to use those settings in &lt;a href="https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/index.html" rel="noopener noreferrer"&gt;Unity’s Input System&lt;/a&gt; documentation. The rest of the post will talk about using the default settings and get started as quick as possible.&lt;/p&gt;

&lt;h1&gt;
  
  
  Using the input system:
&lt;/h1&gt;

&lt;p&gt;In a MonoBehavior class, we should add the package we are using to the top of the class.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="n"&gt;Using&lt;/span&gt; &lt;span class="n"&gt;UnityEngine&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;InputSystem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we are ready to use classes included in the package, for example Keyboard and Gamepad.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keyboard input example
&lt;/h2&gt;

&lt;p&gt;To get input from the keyboard, you can create a new Keyboard variable in your MonoBehavior. Then assign the current connected keyboard to it during initializing the MonoBehavior.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;public&lt;/span&gt; &lt;span class="n"&gt;Keyboard&lt;/span&gt; &lt;span class="n"&gt;_keyboard&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Start&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="n"&gt;_keyboard&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Keyboard&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;current&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, you are ready to detect key presses from the keyboard in the Update method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Update&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
     &lt;span class="nf"&gt;If&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;_keyboard&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wKey&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;isPressed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
     &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="c1"&gt;//do something&lt;/span&gt;
     &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will run every frame, and check if the W key on the keyboard is pressed and return true if it was.&lt;/p&gt;

&lt;p&gt;The input system is very flexible. I encourage you to read in &lt;a href="https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/index.html" rel="noopener noreferrer"&gt;Unity’s Input System&lt;/a&gt; documentation to learn more about how to customize it for your own needs.&lt;/p&gt;

&lt;p&gt;Please check our full video covering this topic in our video beginner series for Unity.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/oae7aW7ayUs"&gt;
&lt;/iframe&gt;
 &lt;/p&gt;

</description>
      <category>csharp</category>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>Unity 102: Scripting</title>
      <dc:creator>Abdullah Hamed</dc:creator>
      <pubDate>Thu, 19 Nov 2020 22:00:24 +0000</pubDate>
      <link>https://dev.to/dotnet/unity-102-scripting-jde</link>
      <guid>https://dev.to/dotnet/unity-102-scripting-jde</guid>
      <description>&lt;p&gt;In the previous post, we installed unity as well as Visual Studio. We added a GameObject within a scene in Unity. We got familiar with the user interface and we created a script. Now, we want to start scripting. Unity uses C# as a scripting language.&lt;/p&gt;

&lt;h1&gt;
  
  
  Game Objects
&lt;/h1&gt;

&lt;p&gt;GameObject is a class that every game object in a scene inherits from. Every GameObject has a class called transform that includes information on where the object is in 3D space. There you can find variables for position, rotation, and scale of an object. You can add more components to this game object through the inspector, or through C#. For more information check the &lt;a href="https://docs.unity3d.com/Manual/class-GameObject.html"&gt;GameObject class&lt;/a&gt; in the Unity documentation.&lt;/p&gt;

&lt;h1&gt;
  
  
  Components
&lt;/h1&gt;

&lt;p&gt;Components inherit from the base class MonoBehaviour. Most of the scripting you will do in Unity will be in MonoBehaviours. Every public varliable you add to a class will be editable in the Unity inspector. This is a good way to access other components in other game objects by just dragging and dropping them in the editor. MonoBehaviour has some callback methods that are called by the engine under certain conditions. They are called Unity Messages. You can get more information on their &lt;a href="https://docs.unity3d.com/Manual/ExecutionOrder.html"&gt;execution order&lt;/a&gt; in the Unity documentation. &lt;/p&gt;

&lt;h1&gt;
  
  
  Unity Messages
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Initialization
&lt;/h2&gt;

&lt;p&gt;Unity does a lot of operations when constructing a MonoBehaviour class, that is obfuscated from a Unity developer. So, instead of using a constructor, Unity provides some Unity Messages that offer multiple  Unity Messages with different execution order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Awake()&lt;/strong&gt;&lt;br&gt;
Awake() runs once after the object is constructed regardless if the component is enabled or not enabled in the Unity editor. It’s the first Unity message in the execution order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OnEnable()&lt;/strong&gt;&lt;br&gt;
OnEnable runs after Awake() and it will only run when the component is enabled in the editor. It can also run again every time the component is enabled.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start()&lt;/strong&gt;&lt;br&gt;
Start() runs after OnEnable() and it will only run once if the component was enabled. It will not run again if the component is re-enabled. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;OnDestroy()&lt;/strong&gt;&lt;br&gt;
This is very simular to a destructor, but in the context of Unity. If a GameObject is destroyed by the engine, this will be the function it will run with it dying breath.&lt;/p&gt;

&lt;h2&gt;
  
  
  Game Loop
&lt;/h2&gt;

&lt;p&gt;Games are state machines. Most of the game logic is written in update functions. Some of them run more frequently than others. Here are some of them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update()&lt;/strong&gt;&lt;br&gt;
The Update() method gets called once every time the engine renders an image on the screen. For example, if the game is running at 60fps, then the update function will run 60 times a second. You will be writing most of your game logic in this method.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FixedUpdate()&lt;/strong&gt;&lt;br&gt;
This is almost identical to the Update() function, but instead of the updating every frame, it will update more frequently according to the physics engine steps. Physics engines calculates steps more frequently than the frame rate usually.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LateUpdate()&lt;/strong&gt;&lt;br&gt;
This is an update method that runs after the Update functions, in case you needed to do calculations after the frame has been rendered. It also runs every time a frame is rendered on the screen.&lt;/p&gt;

&lt;h1&gt;
  
  
  Print to console
&lt;/h1&gt;

&lt;p&gt;There is a static function in Unity called &lt;strong&gt;Debug.Log()&lt;/strong&gt; that you can pass arguments to it, and the value and type of that argument will be printed in the Unity editor console. This function will be your best friend when trying to debug you code real quick.&lt;/p&gt;

&lt;h1&gt;
  
  
  More resources
&lt;/h1&gt;

&lt;p&gt;For more information, check the &lt;a href="https://docs.unity3d.com/Manual/class-MonoBehaviour.html"&gt;MonoBehaviour class&lt;/a&gt; in the Unity documentation.&lt;/p&gt;

&lt;p&gt;Please check our full video covering this topic in our video beginner series for Unity.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/RWLOwg2kUB8"&gt;
&lt;/iframe&gt;
 &lt;/p&gt;

</description>
      <category>csharp</category>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>dotnet</category>
    </item>
    <item>
      <title>Unity 101: Installation</title>
      <dc:creator>Abdullah Hamed</dc:creator>
      <pubDate>Thu, 12 Nov 2020 20:00:27 +0000</pubDate>
      <link>https://dev.to/dotnet/unity-101-installation-587a</link>
      <guid>https://dev.to/dotnet/unity-101-installation-587a</guid>
      <description>&lt;p&gt;Hello, welcome to our Unity 101 video series. This is series will help you to get up and going with Unity as quick as possible. Every week I will publish a blog post that will take accompany you on your journey to use Unity for game development.&lt;br&gt;
First, I'm going to start with explaining what Unity is and how to install it along with Visual Studio. Then we're going to talk about scripting in C# using Visual Studio. Then I'm going to teach you about all the cool features that Unity provides, like the input system, collisions and physics, as well as debugging and code analysis. Finally, I will teach you how to build Unity games and apps for over 25 different platforms.&lt;/p&gt;

&lt;h1&gt;
  
  
  What is Unity
&lt;/h1&gt;

&lt;p&gt;So what is Unity exactly? Unity is a development platform for games and more. For example, anything that requires real time graphics can be done using Unity. For example 3D movies, simulations, and mixed reality experiences can be made using Unity.&lt;br&gt;
Many of your favorite games are made with Unity. For example, the Ori series from Xbox Game Studios, as well as Wasteland 3, are made with Unity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdjxm5th6j8u9izufzinx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdjxm5th6j8u9izufzinx.png" alt="Wasteland 3 Promo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Unity uses .NET to enable C# scripting, and building for over 25 different platforms like iOS, Android, PC, Mac, Linux, game consoles, and MR headsets. Unity comes with a visual editor called the Unity editor as well as Visual Studio for your C# scripting needs.&lt;br&gt;
To learn more about Unity, you can go directly to the &lt;a href="https://docs.unity3d.com/" rel="noopener noreferrer"&gt;Unity documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h1&gt;
  
  
  Installing Unity
&lt;/h1&gt;

&lt;p&gt;To install unity on both windows and Mac, you can head to unity's download page. Run the installer for the Unity Hub. The Unity hub allows us to manage different Unity versions. You should create an account with Unity first so you can activate a license.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9gqslihfeuk0gb78n10x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9gqslihfeuk0gb78n10x.png" alt="Unity license selection in Unity hub"&gt;&lt;/a&gt;&lt;br&gt;
 &lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffucwqyoaxo395s92i356.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Ffucwqyoaxo395s92i356.png" alt="Back after choosing a license in the Unity hub"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fi6zukg0qy07s1x1p8tad.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fi6zukg0qy07s1x1p8tad.png" alt="Add install button in Unity hub"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After running the Unity Hub and activating a free license, for the first time. You will notice that you have no unity versions installed when pressing on the installations tab on the left. You can change that by pressing on Add to install a version of Unity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyepiihaa73qwmvw84fsd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fyepiihaa73qwmvw84fsd.png" alt="Install tab in Unity hub"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We recommend installing the long-term support (LTS) versions for more stability, and as the name says, long-term support from Unity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvmebm44ktzi1bp0xj8zb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fvmebm44ktzi1bp0xj8zb.png" alt="Versions of Unity to install in Unity hub"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you don't have Visual Studio installed, you have the option of installing Visual Studio as part of the installation process here. You can also choose which platforms you want to support. Agree to the terms and conditions and start installing. If you installed Visual Studio separately on windows, make sure you install the unity support from the Visual Studio installer. Visual Studio for Mac is already bundled with support for unity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fuv8g3pp5bw8zuuyg1zqk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fuv8g3pp5bw8zuuyg1zqk.png" alt="Install Visual Studio option in Unity hub"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After unity installs. You can start your project. Go to project tab in the Unity Hub, then click on the new button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzzdhdr1ik4fdu0mue0fm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fzzdhdr1ik4fdu0mue0fm.png" alt="Add project button in Unity hub"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choose 3D, if you want to create a 3D game, then give it a name. Select create when done.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxoe8nyl2lrqp86y6pelt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxoe8nyl2lrqp86y6pelt.png" alt="Project type and naming in Unity hub"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Unity will create your project and you should see Unity’s editor on screen. You are now ready to use Unity.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0dnm9bx79fe8e60q10f5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0dnm9bx79fe8e60q10f5.png" alt="Unity Editor"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Creating scenes
&lt;/h1&gt;

&lt;p&gt;On the left, in the scene hierarchy, you will see that Unity already opened up a Scene for you and added a camera to it. You can think of a scene as a film set, or a game level. You can create multiple scenes and save them separately. To create a new scene, just right click anywhere on the project tab at the bottom then select Create -&amp;gt; Scene.&lt;/p&gt;

&lt;h1&gt;
  
  
  Adding objects to scenes
&lt;/h1&gt;

&lt;p&gt;To add a game object to the scene, right click anywhere on the hierarchy tab. You can see a list of all the types of objects you can add to a scene. Every one of these objects inherit from a base call called GameObject. Choose an object to add, then select it from the scene hierarchy. Look at the inspector window, you can see all the variables and all the components that make up this gameObject. You can think of each one of these components as a C# script with its own class that inherits from MonoBehavior.&lt;/p&gt;

&lt;h1&gt;
  
  
  Creating C# scripts
&lt;/h1&gt;

&lt;p&gt;To create your first C# script, right click anywhere in the Project tab, then choose to create -&amp;gt;  C# script. You can drag and drop the script you created on a GameObject in the hierarchy tab, or in the inspector tab to add it to that GameObject. You can also add it by selecting the Add Component located at the bottom of the inspector tab.&lt;/p&gt;

&lt;p&gt;Double clicking on the script will open up Visual Studio so that you can start editing the script. Once Visual Studio loads up, it should also activate the Unity specific features. A good way to know that Visual Studio has activated is to see the “Attach to Unity” at the top of the IDE.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5ssuhrcv5u06jq13v0re.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F5ssuhrcv5u06jq13v0re.png" alt="Attach to Unity button in Visual Studio"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Unity should have already created a class for you that inherent from MonoBehavior, ready for you to modify. I will discus MonoBehaviours in my next post.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqoxzcmat5wkipmvooe4f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqoxzcmat5wkipmvooe4f.png" alt="Visual Studio"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please check our full video covering this topic in our video beginner series for Unity.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/z9IlpqwawXo"&gt;
&lt;/iframe&gt;
 &lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/oJ4g6oSyLe0"&gt;
&lt;/iframe&gt;
 &lt;/p&gt;

</description>
      <category>csharp</category>
      <category>gamedev</category>
      <category>unity3d</category>
      <category>dotnet</category>
    </item>
  </channel>
</rss>
