{!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 DisallowRefReturnCrossingThisAttribute | Entities | 1.2.0-exp.3
docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Class DisallowRefReturnCrossingThisAttribute

    What is this : Attribute signaling that ref returned values, of a type that has this attribute, cannot intersect with calls to methods that also have this attribute. Motivation(s): ref returns of values that are backed by native memory (unsafe), like IComponentData in ecs chunks, can have the referenced memory invalidated by certain methods. A way is needed to detect these situations a compilation time to prevent accessing invalidated references. Notes:

    • This attribute is used/feeds a Static Analyzer at compilation time.
    • Attribute transfers with aggragations: struct A has this attribute, struct B has a field of type A; both A and B are concidered to have the attribute.
    Inheritance
    object
    Attribute
    DisallowRefReturnCrossingThisAttribute
    Namespace: Unity.Entities
    Assembly: solution.dll
    Syntax
    [AttributeUsage(AttributeTargets.Struct|AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Interface)]
    public class DisallowRefReturnCrossingThisAttribute : Attribute
    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)