# Unity3D

## [Unity game] Arkanoid (block) tutorial (super detailed)

[Unity game] Arkanoid (block) (super detailed) The Arkanoid game is usually regarded as the first case for Unity to learn. Here is how to implement the Arkanoid case. Let’s take a picture to see the effect. First of all, we need to know that QWER is a shortcut key for selection, movement, rotation, and zoom …

## [Game development practice] Unity uses ShaderGraph to make a Loading water polo (Energy Ball UI 2D Special Effects URP)

Article directory I. Introduction * 2. Getting Started with ShaderGraph * 3. ShaderGraph makes 2D Loading water polo * * 1. Create Unlit Shader Graph * 2. Create a circle * 3. The effect of filling from bottom to top * 4. Multiply the fill effect with the circle * 5. Fill border wave effect …

## unity3d uniform back-and-forth movement between two points

var a = new Vector3(0, 0, 0); var b = new Vector3(0, 5, 0); float pingPong = Mathf.PingPong(Time.time, duration); float p = Mathf.InverseLerp(0, duration, pingPong); transform.position =Vector3.Lerp(a, b, p);

## Unity3D creates class singleton

public class Simple{ public static Simple sSimple; private Simple() { //set the class constructor as a private method here } public static Simple getInstance() { if (sSimple == null ) sSimple = new Simple(); return sSimple; } } The class singleton pattern created by Unity3D and java is actually the same. First, judge whether it …

## The realization of unity timer function

Recently, in the process of game development, some functions such as skill cd and buff duration control need to be done, and these functions require a timer; In order to facilitate development, I wrote a simple timer, so that most of the time-related can use this timer; The main functions of the timer are: Countdown …

## Stroke of Unity3D Shader series

Table of contents 1 Introduction 2 How to extend vertices along the normal 2.1 Normal extension + ZTest Always 2.1.1 Code 2.1.2 Problems 2.2 Normal line extension + Cull Front 2.2.1 Code 2.2.2 Improvement points 2.3 Normal extension + ZWrite Off 2.3.1 Code 2.3.2 Problems 2.4 Normal extension + template test 2.5 The problem of …

## Introduction to UnityGUI

Introduction to UnityGUI [What is GUI] ? UnityGUI full name: even mode game user interface (IMGUI) Generally referred to as GUI in Unity, it is a code-driven UI system. The main role of GUI As a debugging tool for programmers, the ship in-game debugging tool. Create custom watch panels for scripting components. Create new editor …

## How Unity moves smoothly – movement and movement methods (with general implementation code)

Introduction of basic knowledge There are 2 ways to move objects Non-physical movement (no force/speed, etc.), just change the position of the object   Physical movement, this time you need to use the physics system in Unity There are 3 types of exercise 1. to move in one direction non-physical movement In Update, the (x, …

## [lua] int64 support

In previous versions, lua only supported double type by default. Although lua number can be changed to int64 by modifying the definition in luaconf.h, it is obviously inappropriate to give up double for int64 type. Then, there are many solutions for 64bit, the basic idea is to use 8bytes string / lightuserdata / userdata to …

## Unity explores block access design analysis & process + code specific implementation

⭐️Foreword introduction: Let’s say we have the following map (concept design) to explore ⭐️ Game Background: The main castle is located in the center on the far right of the map, and monsters are generated from the left. We influence the path of monsters by digging blocks to generate paths, and build towers to resist …