{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class GhostComponentAttribute | Netcode for Entities | 1.1.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class GhostComponentAttribute

    This attribute can be used to tag components to control which ghost prefab variants they are included in and where they are sent for owner predicted ghosts.

    Inheritance
    object
    Attribute
    GhostComponentAttribute
    Implements
    _Attribute
    Inherited Members
    Attribute.GetCustomAttributes(MemberInfo, Type)
    Attribute.GetCustomAttributes(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(MemberInfo)
    Attribute.GetCustomAttributes(MemberInfo, bool)
    Attribute.IsDefined(MemberInfo, Type)
    Attribute.IsDefined(MemberInfo, Type, bool)
    Attribute.GetCustomAttribute(MemberInfo, Type)
    Attribute.GetCustomAttribute(MemberInfo, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo)
    Attribute.GetCustomAttributes(ParameterInfo, Type)
    Attribute.GetCustomAttributes(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(ParameterInfo, bool)
    Attribute.IsDefined(ParameterInfo, Type)
    Attribute.IsDefined(ParameterInfo, Type, bool)
    Attribute.GetCustomAttribute(ParameterInfo, Type)
    Attribute.GetCustomAttribute(ParameterInfo, Type, bool)
    Attribute.GetCustomAttributes(Module, Type)
    Attribute.GetCustomAttributes(Module)
    Attribute.GetCustomAttributes(Module, bool)
    Attribute.GetCustomAttributes(Module, Type, bool)
    Attribute.IsDefined(Module, Type)
    Attribute.IsDefined(Module, Type, bool)
    Attribute.GetCustomAttribute(Module, Type)
    Attribute.GetCustomAttribute(Module, Type, bool)
    Attribute.GetCustomAttributes(Assembly, Type)
    Attribute.GetCustomAttributes(Assembly, Type, bool)
    Attribute.GetCustomAttributes(Assembly)
    Attribute.GetCustomAttributes(Assembly, bool)
    Attribute.IsDefined(Assembly, Type)
    Attribute.IsDefined(Assembly, Type, bool)
    Attribute.GetCustomAttribute(Assembly, Type)
    Attribute.GetCustomAttribute(Assembly, Type, bool)
    Attribute.Equals(object)
    Attribute.GetHashCode()
    Attribute.Match(object)
    Attribute.IsDefaultAttribute()
    Attribute.TypeId
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.NetCode
    Assembly: solution.dll
    Syntax
    [AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct)]
    public class GhostComponentAttribute : Attribute, _Attribute

    Properties

    Name Description
    OwnerSendType

    Get or sets if a component should be be sent to the prediction owner or not. Some combination of the parameters and OwnerSendType may result in an error or warning at code-generation time.

    PrefabType

    Gets or sets the type of prefab where this component should be included on the main entity of the prefab.

    SendDataForChildEntity

    Denotes whether or not this component - when added to a child entity - should send (i.e. replicate) its data. The default behaviour is that Netcode will NOT replicate component and buffer data on children. Why not? It's expensive, as it involves finding child entities in other chunks. Thus, setting this flag to true will enable this (more expensive) serialization of child entities (unless overridden via another "Variant"). Setting to false has no effect (as is the default).

    SendTypeOptimization

    Gets or sets the type of ghost this component should be sent to if the ghost is owner predicted. Formerly: "OwnerPredictedSendType".

    In This Article
    Back to top
    Copyright © 2023 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)