The use and difference of delegation and event in Unity

1, Foreword 1. What is entrustment? A delegate is a container in which functions and methods are placed. The forms of functions are different, and the parameters and return values are different. Therefore, before you delegate, you must first define the type of function stored in the delegate container, that is, the delegate type. After t ...

Added by ultrasound0000 on Thu, 10 Mar 2022 16:44:44 +0200

Unity dialog process tool development

Question: When developing the guidance module, we will always encounter the character dialogue process. In most cases, the product sends the document of the dialogue process to the program, and then the program is processed into its own readable text data. In a sense, the program and product cause a waste of time. For each change in the later ...

Added by scritpkid on Mon, 07 Mar 2022 12:08:02 +0200

[UI interface development] basic component - switch

abstract This chapter is to learn and summarize the knowledge of Toggle in UGUI.In order to better explain their views, this article attempts to analyze some common functions of Toggle from the perspective of "self-made imitation" Toggle Essentials For a Toggle, its biggest feature is that it has two states: on / off, correspon ...

Added by Cramblit on Thu, 03 Mar 2022 06:31:25 +0200

Erase function in Unity

original text see. The pixel recognition / statistical operation of shader is realized through a small Trick 1. Introduction Divide a large image into several small blocks, process and merge them step by step, and retain the down sampling of key pixels: But I was thinking about a simpler method, so I thought of a form of judgment and ...

Added by damiantaylor on Tue, 22 Feb 2022 15:37:24 +0200

[Unity] [Wwise] obtain the duration of a Wwise event in Unity

Once I received such a demand: to display the length of a character's voice on the interface and count down when playing. When I saw this demand at that time, I thought I would directly call the function provided by the official to obtain the event length, but when I did it, I found that I was naive. In the function interface provided by t ...

Added by nicx on Mon, 21 Feb 2022 15:15:44 +0200

Unity Resources - Addressables summary

OK, here I will summarize some code usage of Addressables. As we all know, the purpose of Addressables is to heat up, load and unload resources, which is equivalent to doing what our previous project should do for the management class AssetManager of AssetBundle resource package 1. The first is the hot change of resources. Most of the solution ...

Added by sandrine2411 on Sun, 20 Feb 2022 17:07:15 +0200

Unity3d C# realizes the function of voice synthesis audition and selecting the path to save and download (including source code)

preface It is planned to realize the speech synthesis function, convert text to speech, and support audition and saving functions. After a period of research, it is found that Sogou can be used, with a free quota of 1-2 million words: It is decided to connect with Sogou interface to complete these functions. effect: preparation You c ...

Added by abda53 on Sat, 19 Feb 2022 15:24:25 +0200

Mesh erase effect

Because the erasure effect was needed in previous projects, I didn't know what technology to use at that time, so I cracked other people's games and found a library: Clipper. As a result, we really found the c# library written by the original author on github. The original author actually wrote an mfc exe running file, so we only need the origi ...

Added by MagicMikey on Thu, 17 Feb 2022 10:24:22 +0200

Six principles of Unity design pattern

Six principles of design mode 1. Purpose of design mode Design pattern is for better code reusability, readability, reliability and maintainability. 2. Six commonly used design modes 1) Single responsibility principle 2) Richter's substitution principle 3) Dependency Inversion Principle 4) Interface isolation principle 5) Dimitt's law 6) Open ...

Added by dancingbear on Sat, 12 Feb 2022 10:15:20 +0200

Shader programming_ For the basic texture in unity, use Unity Shader to achieve the rendering effect of the basic texture

Learn how to render basic textures using Unity Shader catalogue Learn how to render basic textures using Unity Shader Q1: describe the diffuse texture, height texture, normal texture, gradient texture and mask texture in detail? Q2: what is model space, tangent space and world space? Q3: what are the advantages and disadvantages of storing ...

Added by Tokunbo on Thu, 10 Feb 2022 01:40:13 +0200