Unity Tips How to find out a script is used by which game objects Our game objects might have lots of scripts, game objects and scenes, we probably can't remember which script is being added to which game object. Unity does provide a built-in HackingWithUnity 15 Feb 2021 · 1 min read
Setup icons in Unity Once we have done the development on the game, it is time to add icons. Take the iOS platform for example: In the Unity, File -> Build Settings to open HackingWithUnity 14 Feb 2021 · 1 min read
Unity Basic Extension Methods Extension Methods are a feature that adding new methods to an existing class, which class is non-generic but static class. Similar to the extension concept in Swift. Features of Extension HackingWithUnity 24 Jan 2021 · 1 min read
Sharing global data among different scenes Global data can help us to share data or variables among different classes, even in different scenes. Used scenarios such as game options including music volume, selected character's skin and HackingWithUnity 23 Jan 2021 · 1 min read
Unity Basic Output formatting in C# See the following examples for the formatting on float and date: using System; using System.Globalization; using System.Threading; namespace CSharpLearning { class Program { static void Main(string[] args) { double f HackingWithUnity 7 Jan 2021 · 1 min read
Unity Basic Get time difference between two date In C#, we can easily add or subtract two dates just like numbers. Example of getting how many days, weeks of two dates // Get time difference between two date DateTime HackingWithUnity 5 Jan 2021 · 1 min read
Unity Basic How to create and use Dictionary in Unity using C# Like many other languages, C# does have the dictionary data type: Features of Dictionary in C#: * Not sorted * Key-value pair using System.Collections.Generic; // example of string key and value HackingWithUnity 3 Jan 2021 · 1 min read
Unity Basic How to convert a String to Array in C# Image we have a string: 123,456,78,789, we want to change it to an array, we can use the following code: string szTmp="123,456,78,789"; string[ HackingWithUnity 2 Jan 2021 · 1 min read
Unity Basic Action and Func in C# Actions and func are another ways to create delegates. Action is a delegate that points to a method which in turn accepts one or more arguments but returns no value. HackingWithUnity 27 Dec 2020 · 1 min read
Free Resource Free 3D Asset Create Tool - Magicavoxel Magicavoxel is one of my favorite tools for creating voxel 3D objects. There are quite a few popular voxel like games such as Minecraft on PC, Xbox and PlayStation, and HackingWithUnity 3 Dec 2020 · 1 min read
Unity Tips Add flashlight to your character in 2D project It is quite common to see fog in the game development. The character only can see places in a certain range. For example, in the game Don't Starve, the player HackingWithUnity 28 Sep 2020 · 2 min read
Unity Basic Get mouse input in Unity To get the mouse input event in Unity, we have to create a script attached to your game object. Then add the following script to it: Mouse click using UnityEngine; HackingWithUnity 21 Sep 2020 · 1 min read