Version: 2023.2

AtomicSafetyHandle.SetAllowReadOrWriteAccess

切换到手册
public static void SetAllowReadOrWriteAccess (Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle handle, bool allowReadWriteAccess);

参数

handle 安全句柄。
allowReadWriteAccess 使用 false 禁止读取或写入访问,true 与此相反。

描述

允许您阻止对该原子安全句柄的读取或写入访问。

For example when a buffer references other data that becomes invalid, then typically the only operation that can still be performed safely is to dispose of the buffer. Calling this method ensures that any further attempts to read or write the buffer will throw an exception.

See Also: AtomicSafetyHandle.GetAllowReadOrWriteAccess.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961