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
Unity Tips Display Game Object's layer name in Hierarchy It is especially useful when we have numerous game objects in the Hierarchy, the following is one example of showing game object's layer name: Note that Default, Player, UI are HackingWithUnity 20 Sep 2020 · 1 min read
Free Resource Free 2D Asset: Handcraft Art Free Asset - 2D Handcrafted Art | 2D Environments | Unity Asset StoreElevate your workflow with the Free Asset - 2D Handcrafted Art asset from Alien Nude LTD. Find this & more Environments HackingWithUnity 16 Sep 2020 · 1 min read
Unity Tips How to run unattached script in Unity As we know, the script is yet another object/component in the Unity, therefore you can either attach the script to an game object or get called explicitly in order HackingWithUnity 14 Sep 2020 · 1 min read
Unity Tips How to install and enable URP (Universal Render Pipeline) Universal Render Pipeline formerly named the Lightweight Render Pipeline, which provides many pre-built functions that can help you quickly and easily optimize graphics and effects across a range of platforms. HackingWithUnity 9 Sep 2020 · 3 min read
Unity Tips Add Custom menu Item on Unity System Menu What is the Custom menu? Look at the MyMenu on the top bar: Unity provides a powerful way to help us to add custom item to its menu, which can HackingWithUnity 6 Sep 2020 · 1 min read
Unity Tips Unity: 2 ways to play animation Animation is indispensable part for any game, this article demonstrates two ways to play animation in Unity. Approach 1: use animation parameter In the bellow example, there are three animations HackingWithUnity 5 Sep 2020 · 1 min read
Free Resource Free Unity Resource: Pixel Font You can use this resource whatever you like in your own project! Pixel Font - Tripfive | 2D Fonts | Unity Asset StoreElevate your workflow with the Pixel Font - Tripfive asset HackingWithUnity 4 Sep 2020 · 1 min read
Unity Basic Set up global variable in Unity Keep your global variables separately is always a good practice no matter what programming language you are working with. using System.Collections; using System.Collections.Generic; using UnityEngine; public class HackingWithUnity 4 Sep 2020 · 1 min read
Unity Tips Unity Plugin: Device Simulator When developing on mobile games, it is necessary to make sure the game is compatible on most of the screen size. Device Simulator is such a plugin or package which HackingWithUnity 3 Sep 2020 · 1 min read
Free Resource Superpowers Asset Packs Royal Free 2D/3D assets, you can use it whatever you want in your game. Download Link: sparklinlabs/superpowers-asset-packsCC0-licensed asset packs for your games. Contribute to sparklinlabs/superpowers-asset-packs development by HackingWithUnity 2 Sep 2020 · 2 min read
Unity Tips Unity Show FPS in scene The following script will help you to show FPS in scene: using System.Collections; using System.Collections.Generic; using UnityEngine; public class FBSManager : MonoBehaviour { public int rangeInt; public float updateInterval HackingWithUnity 31 Aug 2020 · 1 min read