Version: 2017.1
开发版
Xcode framework

导出前和导出后方法

Once you’ve created a build target in Unity Cloud Build, you can set pre- and post-export methods in that build target’s Advanced Options. (See documentation on accessing and editing Advanced Options.)

Edit Advanced Options 屏幕
Edit Advanced Options 屏幕

Specify the Pre-Export Method Name and the Post-Export Method Name here.

The pre- and post-export methods allow you to trigger actions before and after your Unity project is built. These methods must exist as code within your project in the Editor folder in your Asset folder.

Pre-Export Method Name

If you create a public static method in your Unity project, you can direct Unity Cloud Build to execute it before the project is exported by the Unity Editor. When Unity Cloud Build calls this method it passes a BuildManifestObject as an optional parameter. For example: Namespace.NeatMethod(UnityEngine.CloudBuild.BuildManifestObject), where BuildManifestObject is the build manifest for the current build. See Build manifest for more information.

Post-Export Method name

If you create a public static method in your Unity project, you can direct Unity Cloud Build to execute it after the project is exported by the Unity Editor. When Unity Cloud Build calls this method it passes a string as a parameter. For example: Namespace.OtherMethod(string), where string is the path to the exported project. In the case of iOS, your project can then know the location of the Xcode project before it is processed by Xcode and turned into the iOS application .ipa file.

Note: If you’ve tagged any methods in your code with the Unity PostProcessBuildAttribute, those methods are executed before any methods configured as post-export methods in Unity Cloud Build.

开发版
Xcode framework