Version: 2017.3
iOS 构建过程详解
自定义 iOS 启动画面

Unity XCode 项目的结构

When you build a project for the iOS platform Unity will create a folder that contains an XCode project. This project is required to compile and sign your app before deploying on devices, and it allows you to prepare and bundle your game for distribution on the App Store.

在构建 iOS 项目之前,请务必在 Player Settings 中设置 Bundle Identifier。还可以选择在设备或模拟器上运行游戏的 SDK version

Classes 文件夹

此文件夹包含用于集成 Unity Runtime 和 Objective-C 的代码。包含的文件 main.mmUnityAppController.mm/h 是应用程序的入口点,并且您可以创建自己的 AppDelegate(派生自 UnityAppController)。如果您有包含 AppController.h 的插件,则可以直接包含 UnityAppController.h 即可。如果在 Plugins/iOS 文件夹中有 AppController.mm/h,可以合并并重命名它们。

Also the iPhone_Profiler.h file defines a compiler conditional to enable the Internal Profiler. This is a folder for code that doesn’t change often, and you can place your custom classes here. The changes to this folder are preserved between builds when the append mode is selected, but this function doesn’t support multiple build targets and requires a fixed structure of the Libraries folder.

内部性能分析器具有快速且不易察觉的特点,可以提供以下基本信息:

  • 哪个子系统占用了最多帧时间,
  • .NET 堆大小,
  • GC 事件计数/持续时间。 请参阅内置性能分析器以了解更多信息。

Data 文件夹

This contains the serialized game assets, and .NET assemblies (dll files) as full code (or metadata if stripping is on). The machine.config file is the setup for various .NET services such as security, WebRequest, and more. The content of this folder is refreshed with each build, and you should not modify it.

Libraries 文件夹

This contains the .NET assemblies translated into ARM assembler (s files). The libiPhone-lib.a file is the Unity Runtime static library, and RegisterMonoModules.cpp binds Unity native code with .NET. The content of this folder is refreshed with each build, and you should not modify it.

其他新创建的自定义文件夹

您的自定义文件可以放在此处。

图形文件

These are icons and splash screens (png files). These files are automatically managed by Unity. You can setup them in Player Settings.

属性列表文件

The info.plist is managed via Player Settings in Unity. This file is updated when building the player, instead of being replaced. You should not modify it unless it is really needed.

其他文件

这些文件包括 XCode 项目文件(xcodeproj 文件)以及仅在 Project Navigator 中显示的框架链接。

iOS 构建过程详解
自定义 iOS 启动画面
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961