docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    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.

    Inheritance
    object
    AutoInitPreprocessor
    Implements
    IPreprocessBuildWithReport
    IOrderedCallback
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    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.

    Implements

    IPreprocessBuildWithReport
    IOrderedCallback
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)