docs.unity3d.com
    Show / Hide Table of Contents

    Struct PredictedGhostSpawnRequest

    Optional component, used to request predictive spawn of a ghosts by the client. The component is automatically added to the authored ghost prefabs when:

    • The baking target is NetcodeConversionTarget.Client or NetcodeConversionTarget.ClientAndServer.
    • When using the hybrid authoring workflow, if the is Predicted or All.
    • When using the ConvertToGhostPrefab(EntityManager, Entity, GhostPrefabCreation.Config, NativeParallelHashMap<GhostPrefabCreation.Component, GhostPrefabCreation.ComponentOverride>), if the SupportedGhostModes is set to Predicted or All.
    The predicted spawn request is consumed by PredictedGhostSpawnSystem, which will remove the component from the instantiated entity after an initial setup.
    The package provides a default handling for predictive spawning (Unity.NetCode.DefaultGhostSpawnClassificationSystem). In case you need a custom or more accurate way to match the predicted spawned entities with the authoritive server spawned ones, you can implement a custom spawn classification system. See GhostSpawnClassificationSystem for further details.
    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.NetCode
    Syntax
    public struct PredictedGhostSpawnRequest : IComponentData, IQueryTypeParameter
    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