Version: 2022.1

AsyncReadManager.CloseCachedFileAsync

切换到手册
public static Unity.Jobs.JobHandle CloseCachedFileAsync (string fileName, Unity.Jobs.JobHandle dependency);

参数

fileName The path to the file to close.
dependency (Optional) A JobHandle to wait on before performing the close.

返回

JobHandle A JobHandle that completes when the asynchronous close operation finishes.

描述

Closes a file held open internally by the AsyncReadManager.

The AsyncReadManager has an internal cache of up to 10 open files, so use this method if you experience a sharing violation when trying to access one of these files that is held open.

Note: Do not use this method for files opened with OpenFileAsync, as these files do not go into the AsyncReadManager's file cache. Use FileHandle.Close instead.

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