You've successfully subscribed to Hacking with Unity - Learn how to create your own games
Great! Next, complete checkout for full access to Hacking with Unity - Learn how to create your own games
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.
Success! Your billing info is updated.
Billing info update failed.

Unity Tips

How to prevent colliders from passing through each other
Members Public

Collisions with fast-moving objects are always a problem. A good way to ensure that you detect all collisions is to use Raycasting instead of relying on a physics simulation. This works well for bullets or small objects, but won't produce good results for large objects. void FixedUpdate() { Vector3 direction = new

Ben Liu
Ben Liu
Unity Tips

Mouse Click or Finger tap only on eiher game objects or UI objects
Members Public

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 void MouseInput() { if (Input.GetButtonDown("Fire1")) { if (!EventSystem.current.IsPointerOverGameObject()) { Debug.Log(Input.mousePosition); Vector3 pz = Camera.main.ScreenToWorldPoint(Input.

Ben Liu
Ben Liu
Unity Tips

Unity Mesh Introduction
Members Public

What is MeshMesh 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, and a complex polygon is actually made up of multiple triangular faces. So the surface of a 3D model is composed

Ben Liu
Ben Liu
Unity Tips

Coordinate system in Unity
Members Public

Unity uses several different coordinate systems at the same time, as follows: Screen SpaceAlso named Screen point system. The screen coordinates are defined in pixels. The lower left corner of the screen is the start (0, 0) point, and the upper right corner is the (Screen.width, Screen.height) point.

Ben Liu
Ben Liu
Unity Tips

Unity plugs Genshin Impact used
Members Public

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 effects? It is known that Genshin Impact  is developed based on the Unity engine, and Unity has powerful plugin systems.

Ben Liu
Ben Liu
Unity Tips

Copy and paste component properties
Members Public

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 so: Click the gear iconClick the small gear on the right side of the component in the Inpsector, select Copy

Ben Liu
Ben Liu
Unity Tips
How to find out a script is used by which game objects

How to find out a script is used by which game objects
Members Public

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 function that can help us easily identify those game objects or scenes. Select target script, right click Find Reference in

Ben Liu
Ben Liu
Unity Tips
Add flashlight to your character in 2D project

Add flashlight to your character in 2D project
Members Public

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 can only see a certain range around the fire or light. Don't Starve Fog of War This article will show

Ben Liu
Ben Liu
Unity Tips