docs.unity3d.com
    Show / Hide Table of Contents

    Class BakerExtensions

    A collection of extension utility methods for the Baker<TAuthoringType> used by NetCode during the baking process.

    Inheritance
    Object
    BakerExtensions
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.NetCode.Hybrid
    Syntax
    public static class BakerExtensions

    Methods

    GetNetcodeTarget<T>(Baker<T>, Boolean)

    The current conversion target to use for the baking.

    Declaration
    public static NetcodeConversionTarget GetNetcodeTarget<T>(this Baker<T> self, bool isPrefab)
        where T : Component
    Parameters
    Type Name Description
    Baker<T> self

    an instance of the baker

    Boolean isPrefab

    state is we are converting a prefab or not

    Returns
    Type Description
    NetcodeConversionTarget
    Type Parameters
    Name Description
    T
    Remarks

    In the editor, if a is present in the build configuration used for conversion, the target specified by the build component is used.

    Otherwise, the conversion target will be determined by the destination world for runtime conversion, and fallback to always be NetcodeConversionTarget.ClientAndServer is nothing apply or for prefabs.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023