当前位置:网站首页>Getting started with unity
Getting started with unity
2022-07-27 16:59:00 【CAir2】
Now take the online source code as a learning demo:https://github.com/sensorsdata/sa-sdk-unity/releases/tag/v1.0.2
1. function Unity
Choose Main Camera, And in Inspector Set the running script inside , Choose Sample
The operation effect is as shown in the figure :

2. VS debugging Unity
menu :Edit->Preferences, At this point, you can see VS Solutions for

Use VS After opening, you can see C# Script , At this point, it can be attached to Unity It was debugged .
additional Unity When it's ready , Can run Unity, Then you can debug .
3. Switch Unity Operation platform (ios,android,pc)
File->Build Settings

If it is android Equipment , Please put Edit- >Project Settings->Editor Inside Device Set up Any
4. export android Project or compile apk
File->Build Settings
If you check the Export Project, Will be everywhere android engineering , Compile at this time android Generate apk
If I don't check it Export Project, Then directly generate apk
In the course of actual combat , I directly generate apk Always report an error , Finally, there is no way to export android engineering , Then compile apk
Or compile and run directly :File->Build and Run

> ** Trampling pit collection **
**1. VS The breakpoint is invalid during debugging **
reason 1: Source code mismatch , Regenerate it VS Project code :Regenerate project files.
reason 2: Platform mismatch . For example, debug android Platform code , Running on the pc platform , Switch the operation platform .
**2. unity When debugging android The code of the layer is always invalid , But direct operation is no problem . The most common is currentActivity by null**
It is said on the Internet to use Unity remote debugging , But I tried N many times , All invalid , Finally, it can only be packaged into apk, Locate and analyze problems by outputting logs .
边栏推荐
- ShardingSphere-proxy-5.0.0分布式雪花ID生成(三)
- UML图介绍
- 【论文阅读】A CNN-Transformer Hybrid Approach for CropClassification Using MultitemporalMultisensor Images
- Servlet Chinese garbled setcontenttype setting is invalid
- 从零开始Blazor Server(1)--项目搭建
- 获取当前时间的前N天和前后天的数组列表循环遍历每一天
- 实测:云RDS MySQL性能是自建的1.6倍
- Servlet用Cookie实现用户上次登录时间
- 合工大苍穹战队视觉组培训Day7——视觉,jetson naon与D435i
- Servlet uses cookies to realize the last login time of users
猜你喜欢
随机推荐
ShardingSphere-proxy-5.0.0分布式雪花ID生成(三)
Niuke topic -- binary search tree and bidirectional linked list
ES6数组的方法及伪数组转数组方法
牛客题目——最小的K个数
从零开始Blazor Server(1)--项目搭建
Cryptography series: certificate format representation of PKI X.509
In addition to "adding machines", in fact, your micro service can be optimized like this
If you don't want to step on those holes in SaaS, you must first understand the "SaaS architecture"
LNMP environment - deploy WordPress
实测:云RDS MySQL性能是自建的1.6倍
什么是jsp?
Great Cells & Counting Grids
字符流读取文件
Dynamic memory allocation in C language
京东张政:内容理解在广告场景下的实践和探索
Circular statements and arrays
Mpc5744p clock module
string数字类型转换为千分位
meta-data 占位符的引用
[paper reading] transformer with transfer CNN for remote sensing imageobject detection








