Unity Editor installation and Apk packaging

Recently, the boss of the project team suddenly said that the team should use Unity to make a new game on the Huawei App Market. For Unity novices who have only done Android client development, start learning Unity. This post mainly introduces the following two points:

  • How to install Unity Editor

  • If you quickly publish an APK package in the Unity Editor, familiarize yourself with the tool operation

Register a Unity platform account

Using Unity to develop games, download the Unity Editor, download resource files on the Unity Asset Store, etc., all need to use a Unity account, so don't say anything, don't ask anything, first go here to register an account: https://id .unity.com

Install Unity Editor

If a worker wants to do his job well, he must first sharpen his tools. First install the Unity Editor, refer to the official website for instructions: https://unity.cn/releases .

There are a lot of installation methods provided on the official website. Here I used the Unity Hub method recommended by the official website, which is to install the Hub first, and then install the Unity Editor in the Hub.

  • Unity Hub: Personal understanding is a tool for managing Unity projects, Unity Editor, licenses and add-ons, etc. Its positioning can also be seen from the term Hub.

  • Unity Editor: The tool platform for subsequent development projects, similar to Android Studio, for writing and running projects, and you can jump directly to the Unity management console interface through this Editor, which is very convenient in practice.

Specific installation steps:

  1. Install Unity Hub.

Insert picture description here

  1. After installing the Unity Hub, open the Unity Hub and click to install the Unity Editor inside. Here is the latest version that I installed.

Insert picture description here

Insert picture description here

  1. License management. The personal license I use here is enough for beginners and business enthusiasts.

Insert picture description here

Install Visual Studio (not required)

In theory, this step does not need to be operated. Visual Studio will be automatically installed during the Unity Editor installation process (Unity generally uses VS as a script editor), but I don’t know the reason when installing the Editor. I am prompted here that the installation of VS failed. , So Baidu has it, if the installation fails, you can install VS separately, refer to https://blog.csdn.net/fromfire2/article/details/81270185/

If the installation is normal, you should be able to connect to VS here. The correct result is as follows:

Insert picture description here

New Project

  1. Open Unity Hub and create a new project in the following interface.

Insert picture description here

  1. After clicking the Create button, the Unity Editor automatically starts to open the project. For each new project, Unity will have a default sample game scene: SampleScene

Insert picture description here

Scene, as its name implies, is the buildings, characters, backgrounds, sounds and special effects we see in the game. It is basically the same concept as the game "scene" we see when we play the game.

For more introduction to some basic concepts of Unity, you can search online, or directly refer to the documentation on the Unity official website: https://docs.unity.cn/cn/current/Manual/UsingTheSceneView.html

After packaging the APK on the
Unity Editor to create a new project, there will be a SampleScene, how to add characters, buildings, backgrounds, sounds, buttons, etc. to this game Scene, here I don’t care, use on-demand learning for the following projects, first get familiar Unity package operation, just package an empty SampleScene directly.

  1. Android environment settings. Refer to the official website document. Here because I have the Android SDK and Jave SDK locally, I have associated my own local SDK.

Insert picture description here

  1. Refer to the following operations to choose to publish the Android package, and modify the package name and version number and other information.

Insert picture description here

  1. Connect the phone, refer to the following operations to open the APK package.

Insert picture description here

This app can be installed normally on your phone~~~~ There are pictures and the truth! ! !

Insert picture description here

For more details, please refer to:
Unity Chinese Document:https://docs.unity.cn/cn/current/Manual/index.html


Original link:https://developer.huawei.com/consumer/cn/forum/topic/0204405811539110247?fid=18

Author: Mayism

Guess you like

Origin blog.51cto.com/14772288/2577289