Hacking with Unity - Learn how to create your own games
  • Unity Basics
  • C#
  • Free Resources
Log in Subscribe
Log in Subscribe
  • Unity Basics
  • C#
  • Free Resources

HackingWithUnity

Hi I'm HackingWithUnity
93 posts
Use rich text in console output like a pro Unity Tips

Use rich text in console output like a pro

In Unity, the console is the most important place where we debug and output variables or objects. Here is an example of the console output in Unity: Is there anyway

  • Go to the profile of  HackingWithUnity
HackingWithUnity
20 Mar 2023 · 1 min read
Interface in C# explained with Unity examples C#

Interface in C# explained with Unity examples

Interface is another cornerstone concept in the Object-oriented Programming. They are not classes so that they can't have their own instances. Features of interface: * A class can implement more than

  • Go to the profile of  HackingWithUnity
HackingWithUnity
9 Mar 2023 · 1 min read
Polymorphism in Unity Unity Basic

Polymorphism in Unity

Like many other programming languages, Polymorphism is a feature of object-oriented programming that allows classes to have more than one type. Simply put, we can let a child class considered

  • Go to the profile of  HackingWithUnity
HackingWithUnity
3 Mar 2023 · 1 min read
Camera following in Unity Unity Basic

Camera following in Unity

Let the camera follow the character's movement in Game is quite often to see in games, such as Super Mario. Luckily Unity make it quite easy to implement by making

  • Go to the profile of  HackingWithUnity
HackingWithUnity
1 Mar 2023 · 1 min read
Rendering pipeline in Shader Shader

Rendering pipeline in Shader

The rendering pipeline, also named the graphics pipeline, is a series of stages that a graphics assets goes through to render an image on the user's screen. The reason why

  • Go to the profile of  HackingWithUnity
HackingWithUnity
28 Feb 2023 · 2 min read
CG/HLSL Data Types in Shader

CG/HLSL Data Types in Shader

In the article Introduction to Shader in Unity 2023, we already saw how to define a variable in Properties, and which provides a way we can adjust values on the

  • Go to the profile of  HackingWithUnity
HackingWithUnity
27 Feb 2023 · 2 min read
Shader Data Types

Shader Data Types

As mentioned in the Introduction to Shader in Unity, Unity provides tons of the Shader data types which can use to create fantastic visual effects. Here are more details on

  • Go to the profile of  HackingWithUnity
HackingWithUnity
26 Feb 2023 · 3 min read
Semantics in Shader

Semantics in Shader

After the example in the last article(), we have seen a couple of places using Semantics. In this article, we are going to have a look at the most common

  • Go to the profile of  HackingWithUnity
HackingWithUnity
25 Feb 2023 · 2 min read
SubShader in Unity

SubShader in Unity

As mentioned in the Introduction to Shader in Unity, we all know that a Shader must contain at least one SubShader, and maybe more than one SubShaders, which is the

  • Go to the profile of  HackingWithUnity
HackingWithUnity
24 Feb 2023 · 3 min read
Introduction to Shader in Unity

Introduction to Shader in Unity

Many of us have heard or even used Shader in the Unity game, so in the next coming few weeks, we will go through few hot topics on the Shader.

  • Go to the profile of  HackingWithUnity
HackingWithUnity
23 Feb 2023 · 5 min read
Quaternion in Unity Unity Basic

Quaternion in Unity

In Unity, Quaternion is used to represent rotation, which is a struct, contains 4 components, x, y, z and w, representing a gameobject's coordinator in the scene. We can use

  • Go to the profile of  HackingWithUnity
HackingWithUnity
22 Feb 2023 · 1 min read
How to auto destroy a game object after a few seconds in Unity C#

How to auto destroy a game object after a few seconds in Unity

Image we have a gameobject with a script SelfExplode attached to it. We want this specific gameobject explode with 60 seconds after spawn. Full script: using System.Collections; using System.

  • Go to the profile of  HackingWithUnity
HackingWithUnity
21 Feb 2023 · 1 min read
Methods in MonoBehaviour and execution order C#

Methods in MonoBehaviour and execution order

In Unity, MonoBehaviour is a class that you can use to extend the functionality of a game object. When you attach a script derived from MonoBehaviour to a game object,

  • Go to the profile of  HackingWithUnity
HackingWithUnity
20 Feb 2023 · 2 min read
Import 2D Sprites in Unity Unity Basic

Import 2D Sprites in Unity

Suppose we have a bunch of 2D resources, such as idle, run, and so on, and we want to import that in our 2D game with animation, here are few

  • Go to the profile of  HackingWithUnity
HackingWithUnity
19 Feb 2023 · 2 min read
GameManager Template in Unity Unity Tips

GameManager Template in Unity

Many game developer are using GameManager to manage the game status, do initialization and more in their games. So it is recommend for anyone who wants to have the same

  • Go to the profile of  HackingWithUnity
HackingWithUnity
18 Feb 2023 · 1 min read
[System.Serializable] in Unity Unity Basic

[System.Serializable] in Unity

[System.Serializable] is a C# attribute that can be applied to a class, struct, or field to indicate that it can be serialized by Unity's serialization system. By doing which

  • Go to the profile of  HackingWithUnity
HackingWithUnity
17 Feb 2023 · 1 min read
How to refer child game objects' instance in Unity Unity Tips

How to refer child game objects' instance in Unity

Image you have a grouped objects in the hierarchy, Game object 1 has child game objects 1_0, 1_1 and 1_2 as following: So how do we get

  • Go to the profile of  HackingWithUnity
HackingWithUnity
16 Feb 2023 · 1 min read
Turn JSON string into Custom objects in Unity Unity Basic

Turn JSON string into Custom objects in Unity

Store user's data or game's state in JSON, or fetch data from api call in game, Luckily, Unity does provide the JsonUtility to rescue, which can easily convert a json

  • Go to the profile of  HackingWithUnity
HackingWithUnity
16 Feb 2023 · 1 min read
© 2023 Hacking with Unity - Learn how to create your own games. All rights reserved.