Unity Tips Mouse Click or Finger tap only on either game objects or UI objects When facing the situation that we want the mouse click and finger tap can happened only on either game objects or UI items. Here is how: using UnityEngine.EventSystems; private HackingWithUnity 15 Mar 2021 · 1 min read
Unity Tips Unity Mesh Introduction What is Mesh Mesh is a component in Unity, called mesh component. Simply put, Mesh refers to the mesh of the model. The 3D model is made up of polygons, HackingWithUnity 10 Mar 2021 · 2 min read
Unity Basic Walk Through Monobehaviour Like other fundamental parts such as GameObject, Compoent, Time, Input and Physics, Monobehaviour is an essential member for writing the script, which is the soul of an GameObject. This article HackingWithUnity 8 Mar 2021 · 1 min read
Unity Tips Coordinate system in Unity Unity uses several different coordinate systems at the same time, as follows: Screen Space Also named Screen point system. The screen coordinates are defined in pixels. The lower left corner HackingWithUnity 6 Mar 2021 · 2 min read
C# Date time in C# It is quite common to see Date and Time used in the game, here are some frequently used methods: Get the current date time // Get the current date and time HackingWithUnity 4 Mar 2021 · 1 min read
Unity Tips Unity plugs Genshin Impact used Genshin Impact is an open-world action role-playing game developed and published by miHoYo, gained millions of users since it was launched. But how does it to achieve its amazing visual HackingWithUnity 25 Feb 2021 · 2 min read
C# Ternary Operator in C# Also called One-line if: Syntax condition ? consequent : alternative Example using UnityEngine; using System.Collections; public class TernaryOperator: MonoBehaviour { void Start() { int age = 20; string message; message = health > 20 ? "should buy HackingWithUnity 23 Feb 2021 · 1 min read
Unity Tips Copy and paste component properties It is quite common to adjust value while developing a game, and sometimes we need to put down those values while game is running. There are two ways of doing HackingWithUnity 22 Feb 2021 · 1 min read
C# Namespaces in C# Namespaces are like containers for classes, which can help us organize the code, we see the same concept in other programming languages such as Java, Python and other languages. The HackingWithUnity 19 Feb 2021 · 1 min read
C# Properties in C# Like many other programming languages, C# class does have the class properties, also called fields. Example of the class property public class Player { private int experience; public int Experience { get HackingWithUnity 19 Feb 2021 · 1 min read
C# Use Singleton in Unity Singleton is a common design pattern in programming, which keeps only one copy of a variable or object throughout the entire runtime of the program. Create a Singleton is quite HackingWithUnity 18 Feb 2021 · 1 min read
Unity Basic Get game object active status in script It is quite often important to know whether a game object is active or not. bool menuStatus = gameobject.activeSelf; gameObject is the game object in the hierarchy. We can use HackingWithUnity 18 Feb 2021 · 1 min read