Simple imitation of mouse interaction in Unity advanced (scenario: mobile phone screen as Touch Pad, moving mouse, mouse confirmation, etc.)

Simple imitation of mouse interaction in Unity advanced (scenario: mobile phone screen as Touch Pad, moving mouse, mouse confirmation, etc.) catalogue Simple imitation of mouse interaction in Unity advanced (scenario: mobile phone screen as Touch Pad, moving mouse, mouse confirmation, etc.) 1, Brief introduction 2, Implementation princi ...

Posted by Ozzmosis on Sun, 19 Dec 2021 06:22:30 +0100

"Super hard core version of sorting algorithm" in ML agents case

This case comes from the official example of ML agents, Github address: https://github.com/Unity-Technologies/ml-agents , this article is a detailed supporting explanation. Based on my previous two articles, I need to know about ml agents. For details, see: The use of ML agents in Unity reinforcement learning,Ml agents command and configuratio ...

Posted by hitman6003 on Wed, 15 Dec 2021 16:38:33 +0100

Default import rules for modifying pasted pictures in Unity3D editor

After the map is imported into unity, it will be automatically set to compression format. It will first judge whether the map has transparent channels. Android: compressed into ETC1 without transparent channel, compressed into ETC2 with transparent channel, and not divided by 4. fall back to RGBA32 IOS: compressed into RGB PVRTC witho ...

Posted by guilhenfsu on Wed, 01 Dec 2021 17:36:57 +0100

Go deep into the security and memory allocation of static readonly in C # [original]

In depth security and memory allocation of static readonly [original] Problem origin: in order to develop frame synchronization, when writing the Vector3 class of fixed points, you want to add some static read-only fields to this class like Vector3 of Unity, such as Vector3.up in Unity, etc. After reading the Unity source code, I found that i ...

Posted by rubbertoad on Sun, 28 Nov 2021 13:33:40 +0100

Fog effect in Unity

Unity native supports fog effect, which can be set through Window/Rendering/Lighting Settings: Unity supports three modes of fog effect, Linear, Exponential and Exponential Squared. The formula of fog efficiency coefficient corresponding to Linear mode is as follows: f = ...

Posted by the_reverend on Tue, 16 Nov 2021 17:42:08 +0100

Implementation of UGUI picture running lamp

Today, we use UGUI to display multiple pictures automatically. The details are as follows 1. Read all pictures from a specific folder 2. Arrange and display all pictures. If it is beyond the range of the screen, scroll circularly 3. Click the picture and pause scrolling. The picture is enlarged and displayed in the middle of the screen. Clic ...

Posted by ShogunWarrior on Fri, 12 Nov 2021 15:39:25 +0100

Unity realizes flying saucer games

Unity realizes flying saucer games Project address Demo video Adapter mode overview definition The adapter pattern converts the interface of a class into another interface expected by the client. The main purpose is compatibility, so that the two classes that cannot work together due to interface mismatch can work together. Its alias is wr ...

Posted by bh on Sat, 23 Oct 2021 08:43:16 +0200

Reflection in Unity

CubeMap Sampling Unity provides the Unity_GlossyEnvironment function to sample cubemap s. This function is implemented as follows: half3 Unity_GlossyEnvironment (UNITY_ARGS_TEXCUBE(tex), half4 hdr, Unity_GlossyEnvironmentData glossIn) { half perceptualRoughness = glossIn.roughness /* perceptualRoughness */ ; // TODO: CAUTION: remap f ...

Posted by keyont on Mon, 13 Sep 2021 00:21:25 +0200

UGUI advanced knowledge [9] floating word prompt improvement

I wrote an article about floating words UGUI advanced knowledge [5] floating word prompt There are still some disadvantages in the floating word prompt in this article, because one of the key points of UI is screen adaptability, so here we use the new article to write the key points It can't be achieve ...

Posted by scofansnags on Sat, 27 Jun 2020 06:14:13 +0200

How to listen for Auto Save events after Prefab modification in Editor

1) How to listen for Auto Save events after Prefab modification in Editor 2) On the advantages of turning on the Optimal option of animation files 3) Is it helpful for performance to split a large terrain into multiple mesh Colliders 4) Camera.SetReplacementShader And Projector display problems 5) FMOD can't switch sound when plugging in and ou ...

Posted by felixtgomezjr on Thu, 18 Jun 2020 09:06:01 +0200