• Implementation of unity3d starting external program and passing parameters


    Previous development projects have always used the mode of shell plus subroutine. The subroutine is started through the shell. The communication between the shell and the subroutine is completed by using the configuration file. I always find such communication troublesome, because the shell needs to change and write the configuration file, and then the subroutine […]

  • Unity3d uses fairygui to customize font operation


    Recently, UI students used a new font (sharp characters, sharp lines, black Jane in full bloom) and found that all the fonts were cut into pictures, which scared me to death Process of using fonts with unity3d and fairygui 1. The first step must be to find art students to get the fonts they find […]

  • How unity3d changes the background color of a button


    I won’t talk more nonsense. Let’s look at the code directly~ using UnityEngine; using System.Collections; public class ButtonStyle : MonoBehaviour { public Color _ color;// Select the background color in the editing environment. The transparency cannot be 0 public Texture2D tex; Void ongui() {GUI. Button (New Rect (0,0100100), “tex”); color oldcolor = GUI. BackgroundColor; // […]

  • Detailed explanation of the use of unity3d singleton mode and static class


    The API of unity3d provides many functions, but many processes will be encapsulated by themselves. Of course, there are many frameworks on the Internet that can be downloaded and used, but they will certainly not be easier to use than those written by themselves. I am positive about the need to use the framework. Encapsulating […]

  • Detailed explanation of unity’s ugui


    UGUI Article catalogue UGUI Overview of six basic components Attached to canvas object: Canvas Canvas Scaler Graphic Raycaster RectTransform Attached on eventsystem object: EventSystem Standalone Input Module Canvas canvas component Screen Space overlay Screen Space Camera World Space Canvas scaler canvas scale controller component Pre school preparation: Constant pixel size Scale with screen size Expand […]

  • [unity games] brick (box) tutorial (super detailed)


    [unity games] playing bricks (playing squares) (super detailed) Brick playing games are usually regarded as the first case of unity learning. Let’s introduce how to realize the brick playing case. Let’s take a picture first to see the effect First of all, we need to know that qwer is the shortcut key for selecting, moving, […]

  • Unity click the button to show / hide the image method


    As like as two peas, I just provided some examples. Example 1: create announcement interface ① Create a button. I suggest renaming it (for easy identification). I change it to the announcement button ② Create an image, and then create a button in the image subdirectory. It is also recommended to rename (for easy identification). […]

  • Unity3d c# realizes the function of arrow indicating the position of 3D map object on ugui (including source code)


    preface Previously, we realized “[ugui panel follow annotation 3D model function]( https://blog.csdn.net/qq_33789001/article/details/120864639 )”The effect is as follows: If soAnnotation UI errorThe problem has been fixed in the link above. It is found that if the objects are moved out of the field of view, the prompt will disappear. On the objects that need key prompt, […]

  • All compiler errors have to be fixed before you can enter playmode


    All compiler errors have to be fixed before you can enter playmode! 1. Select asset store under windows 2. Click search online and enter standard assets in the search column of the page 2(1). If this is the case after opening the asset store, you can directly enter standard assets to find it 3. Find […]

  • Solve the problem that unity3d imported model mapping materials are missing


    Today, a model was imported, but the model map was lost, and the inspector panel was in a state that could not be edited Although it can be replaced by re creating materials, a new prefab will be generated, which is not good. Make the following changes and fill in the corresponding materials Add: missing […]

  • GameObject is used in unity Methods of find(), findwithtag(), findgameobjectswithtag(), etc


    In the process of unity development, skillfully using some function methods can help us better develop some functions and improve the efficiency of development. Here are some functions and methods of unity about finding aspects. GameObject.Find() This method has no other overloaded methods. Find a non-specific object by its name. In short, when there are […]

  • Unity button click event


    I Visual creation and event binding First, click the add component search button at the bottom of the inspector panel   Add button component Then write a script to add to any game object using System.Collections; using System.Collections.Generic; using UnityEngine; public class Text : MonoBehaviour { /// <summary> // / this method is called after […]