Script hooks allow you to run custom scripts or Editor code before the build starts or after it is completed.
선처리 및 후처리 익스포트 메서드를 사용하면 Unity 프로젝트가 빌드되기 전후에 액션이 동작할 수 있도록 합니다. 이러한 메서드는 프로젝트의 Assets/Editor 폴더에 코드로 존재해야 합니다. Editor 폴더가 디렉토리에 없으면 새로 생성하십시오.
중요: UnityEngine.CloudBuild.BuildManifestObject 클래스는 클라우드 빌드(로컬 상태 아님)에서 실행 중일 때만 사용할 수 있습니다. 코드를 로컬로 컴파일하려면 선처리 및 후처리 익스포트 메서드를 #if UNITY_CLOUD_BUILD
블록으로 래핑해야 합니다.
빌드 타겟의 고급 옵션에서 선처리 및 후처리 익스포트 메서드를 설정하십시오.
To use a pre-export method, create a public static method in your Unity Project that contains the code you want executed before the Unity Editor exports your project but after the Unity Editor script compilation phase.
public static void PreExport()
클라우드 빌드를 활성화한 후 메서드 서명에서 BuildManifestObject 오브젝트를 파라미터로 지정하여 현재 빌드의 빌드 매니페스트를 선처리 익스포트 메서드로 전달할 수 있습니다. 그런 다음 프로젝트를 익스포트하기 전에 프로젝트 또는 Player 설정을 변경하십시오.
public static void PreExport(UnityEngine.CloudBuild.BuildManifestObject manifest)
Unity 클라우드 빌드는 메서드를 호출할 때 BuildManifestObject 오브젝트를 옵션 파라미터로 전달합니다. 이 경우 BuildManifestObject가 현재 빌드의 빌드 매니페스트입니다.
자세한 내용은 ScriptableObject로 매니페스트 빌드를 참조하십시오.
후처리 익스포트 메서드를 사용하려면 Unity 에디터에서 프로젝트를 익스포트한 후에 실행하려는 코드가 포함된 Unity 프로젝트에 공용 정적 메서드를 생성하십시오.
public static void PostExport(string exportPath)
Unity 클라우드 빌드가 메서드를 호출할 때 다음 문자열을 전달합니다.
참고: 만일 Unity에서 코드에 메서드를 하나라도 태그한 경우 PostProcessBuildAttribute, 태그된 메서드는 Unity 클라우드 빌드에서 후처리 익소프트 메서드로 설정된 메서드 이전에 실행됩니다.
Using Cloud Build, you can create custom scripting #define directives. On the Unity Developer website, go to the build target’s Advanced Options.
In the Scripting Define Symbols field, you can add your own custom scripting #define directives to the built-in selection available. For each build target, enter the names of the symbols you want to define. You can then use these symbols as the conditions in #if directives, just like the built-in symbols. For more information, see Conditional Compilation.
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.