当前位置:网站首页>Unity uses macros
Unity uses macros
2022-07-25 23:07:00 【The cat is not here】
Can be in player setting It defines macros

It can also be defined by code
PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone, item.Symbol);// Save information to macro information . Parameters 1: To which platform Parameters 2: What to save .
Official explanation
- I used to think that after defining a symbol , It is necessary to judge whether this symbol exists . But there is no need to .

C# Instructions explain in detail
Use multi-channel packaging sdk
- This is very useful because it can be packaged through multiple channels sdk
- Define different channels symbol
- And these sdk All relevant access property codes take precompiled instructions
- When automated packaging , Define these symbol, Output different packages
- But I have another problem , That is to say , How to distinguish different files .
- That is to say oppo Need to rely on oppo.dll, Huawei needs to rely on huawei.dll
- How to eliminate these documents when typing different kinds of packages .
[CreateAssetMenu(order =12,menuName =" Create channel settings ")]
public class ChannelSetting : ScriptableObject
{
public string Channel;
public string Symbol;
}
[MenuItem("Build/BuildAll")]
static void BuildAllPlatform()
{
var settings = Resources.LoadAll<ChannelSetting>("ChannelSettings");
foreach (var item in settings)
{
PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone, item.Symbol);// Save information to macro information . Parameters 1: To which platform Parameters 2: What to save .
var path =Path.Combine( System.Environment.CurrentDirectory, item.Channel, $"{
item.Channel}.exe");
BuildPlayerOptions buildPlayerOptions = new BuildPlayerOptions();
buildPlayerOptions.locationPathName = path;
buildPlayerOptions.target = BuildTarget.StandaloneWindows;
buildPlayerOptions.targetGroup = BuildTargetGroup.Standalone;
var res = BuildPipeline.BuildPlayer(buildPlayerOptions);
}
}
- One of the more pitfalls is , When packaging, you need to specify the output folder , I always thought it was to specify folders , The results have been consistent Report errors
UnityException: Build path contains project built with "Create Visual Studio Solution" option, which is incompatible with current build settings. Consider building your project into an empty directory. - In fact, you need to add the name of the file
边栏推荐
- Analysis of direction finding error of multi baseline interferometer system
- uvm_hdl——DPI在UVM中的实现(四)
- anaconda安装教程环境变量(如何配置环境变量)
- QT string operation
- Network Security Learning (XV) ARP
- QT Chinese programming encounters c2001 error, prompting "there is a newline character in the constant"
- JS makes elements get or lose focus
- [PMP learning notes] Chapter 1 Introduction to PMP System
- [tensorflow] 关于 seed
- js正则表达式匹配ip地址(ip地址正则表达式验证)
猜你喜欢

Mysql数据类型

How painful is it to write unit tests?
![[literature reading] - HRL -[hrl with universal policies for multi step robotic control]](/img/34/06d5ba3af4e6e775a335324c020161.png)
[literature reading] - HRL -[hrl with universal policies for multi step robotic control]

CMU AI PhD first year summary

MathType安装和解决不能Crtl+V的问题
![[paper notes] a meta reinforcement learning algorithm for causal discovery](/img/03/84462b38551c41173f7a9734cb0e99.png)
[paper notes] a meta reinforcement learning algorithm for causal discovery

Drive board network cable directly connected to computer shared network configuration

Enabling partners, how can Amazon cloud technology "get on the horse and get a ride"?

Solve the problem phpstudy failed to import the database

Notification(状态栏通知)详解
随机推荐
Expression of directional signal -- complex exponential signal
5 ROS simulation modeling (3-rviz+gazebo+ control simulation robot)
PE format: analyze and implement IATHOOK
四旋翼飞行器的飞控实现「建议收藏」
Stack and stack class
Secure code warrior learning record (IV)
Design of Butterworth filter and drawing of amplitude frequency characteristic curve
2021-09-30
Qtreewidget control of QT
Ssh server CBC encryption mode vulnerability (cve-2008-5161)
Hj7 take approximate value
Mocha test
Network security and level protection
Network Security Learning (XIII) data link layer
通用分页功能
The small icon of notification setting shows a small square
About using NPM command under the terminal, the installation error problem is solved (my own experience)
Experiment 1, experiment 2 and Experiment 3 of assembly language and microcomputer principle: branch program design / loop program design / subroutine design
The fourth experiment nat
Circle detection and line detection of PCL