Class AutoInitPreprocessor
The AutoInitPreprocessor
class implements the IPreprocessBuildWithReport
interface to handle
pre-build asset management for Unity projects with the Facebook Instant Games SDK package installed. It ensures
that, depending on the build configuration, the appropriate assets are present or removed from the local project
before the build process starts.
Inherited Members
Namespace: Global Namespace
Assembly: Unity.Meta.InstantGames.Editor.dll
Syntax
public class AutoInitPreprocessor : IPreprocessBuildWithReport, IOrderedCallback
Properties
callbackOrder
Gets the callback order for the pre-build process. This determines the order in which the pre-build steps are executed.
Declaration
public int callbackOrder { get; }
Property Value
Type | Description |
---|---|
int |
Methods
OnPreprocessBuild(BuildReport)
Executes the pre-build process. If the build target is Facebook Instant Games, it copies the auto-initializing pre-js asset to the destination directory. Otherwise, it deletes the asset if it exists to prevent timeouts from occurring outside the Facebook Instant Games platform.
Declaration
public void OnPreprocessBuild(BuildReport _)
Parameters
Type | Name | Description |
---|---|---|
BuildReport | _ | The build report; not used in this implementation. |