docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class OpenXRFeatureBuildHooks

    Inherit from this class to implement callback functions that will hook into the build process. They will be called when a project with the corresponding OpenXR feature enabled is being built.

    Inheritance
    object
    OpenXRFeatureBuildHooks
    Implements
    IPostGenerateGradleAndroidProject
    IPostprocessBuildWithReport
    IPreprocessBuildWithReport
    IOrderedCallback
    IAndroidManifestRequirementProvider
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEditor.XR.OpenXR.Features
    Assembly: Unity.XR.OpenXR.Editor.dll
    Syntax
    public abstract class OpenXRFeatureBuildHooks : IPostGenerateGradleAndroidProject, IPostprocessBuildWithReport, IPreprocessBuildWithReport, IOrderedCallback, IAndroidManifestRequirementProvider

    Properties

    callbackOrder

    Returns the current callback order for build processing.

    Declaration
    public abstract int callbackOrder { get; }
    Property Value
    Type Description
    int

    Int value denoting the callback order.

    featureType

    System.Type of the class that implements OpenXRFeature.

    Declaration
    public abstract Type featureType { get; }
    Property Value
    Type Description
    Type

    Methods

    OnPostGenerateGradleAndroidProject(string)

    Post process build step for checking if a feature is enabled for android builds. If so will call to the feature to run their build post processing for android builds.

    Declaration
    public virtual void OnPostGenerateGradleAndroidProject(string path)
    Parameters
    Type Name Description
    string path

    Path to gradle project.

    OnPostGenerateGradleAndroidProjectExt(string)

    Called during build process when extension is enabled. Implement this function to receive a callback after the Android Gradle project is generated and before building begins. Function is not called for Internal builds.

    Declaration
    protected abstract void OnPostGenerateGradleAndroidProjectExt(string path)
    Parameters
    Type Name Description
    string path

    The path to the root of the Gradle project. Note: When exporting the project, this parameter holds the path to the folder specified for export.

    OnPostprocessBuild(BuildReport)

    Post-process build step for any necessary clean-up. This will also call to the feature to run their build post processing.

    Declaration
    public virtual void OnPostprocessBuild(BuildReport report)
    Parameters
    Type Name Description
    BuildReport report

    Build report.

    OnPostprocessBuildExt(BuildReport)

    Called during the build process when extension is enabled. Implement this function to receive a callback after the build is complete.

    Declaration
    protected abstract void OnPostprocessBuildExt(BuildReport report)
    Parameters
    Type Name Description
    BuildReport report

    BuildReport that contains information about the build, such as the target platform and output path.

    OnPreprocessBuild(BuildReport)

    Pre process build step for checking if a feature is enabled. If so will call to the feature to run their build pre processing.

    Declaration
    public virtual void OnPreprocessBuild(BuildReport report)
    Parameters
    Type Name Description
    BuildReport report

    Build report.

    OnPreprocessBuildExt(BuildReport)

    Called during the build process when the feature is enabled. Implement this function to receive a callback before the build starts.

    Declaration
    protected abstract void OnPreprocessBuildExt(BuildReport report)
    Parameters
    Type Name Description
    BuildReport report

    Report that contains information about the build, such as its target platform and output path.

    OnProcessBootConfigExt(BuildReport, BootConfigBuilder)

    Called during the build process when extension is enabled. Implement this function to add Boot Config Settings.

    Declaration
    protected virtual void OnProcessBootConfigExt(BuildReport report, BootConfigBuilder builder)
    Parameters
    Type Name Description
    BuildReport report

    BuildReport that contains information about the build, such as the target platform and output path.

    BootConfigBuilder builder

    This is the Boot Config interface that can be used to write boot configs

    ProvideManifestRequirement()

    Post process build step for checking if the hooks' related feature is enabled for Android builds. If so, the hook can safely provide its Android manifest requirements.

    Declaration
    public virtual ManifestRequirement ProvideManifestRequirement()
    Returns
    Type Description
    ManifestRequirement

    ProvideManifestRequirementExt()

    Called during build process when collecting requirements for Android Manifest. Implement this function to add, override or remove Android manifest entries.

    Declaration
    protected virtual ManifestRequirement ProvideManifestRequirementExt()
    Returns
    Type Description
    ManifestRequirement

    Implements

    IPostGenerateGradleAndroidProject
    IPostprocessBuildWithReport
    IPreprocessBuildWithReport
    IOrderedCallback
    IAndroidManifestRequirementProvider
    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)