Version: 2022.1
言語: 日本語
public NativeArray<MeshTransform> GetUpdatedMeshTransforms (Unity.Collections.Allocator allocator);

パラメーター

allocator The allocator to use for the returned NativeArray.

戻り値

NativeArray<MeshTransform> A new NativeArray of MeshTransforms.

説明

Gets the updated mesh transforms.

Use this to get updated transforms for each mesh tracked by the subsystem. The number of transforms returned may be less than the total number of tracked meshes. The results may be affected by previous calls to this method. That is, only transforms that have changed since the last call to this method may be returned.

Typically, you should call this at regular intervals, for example, once per frame, in order to update the transform of each mesh. When a mesh is generated using XRMeshSubsystem.GenerateMeshAsync, the MeshGenerationResult also contains a transform and timestamp. Because generation is asynchronous, you can compare timestamps to ensure you are using the most recent transform. Larger values indicate newer transforms.

This method always returns a new NativeArray, even when there are no updated transforms. The caller is responsible for disposing the returned NativeArray.

See Also: MeshTransform, XRMeshSubsystem.GenerateMeshAsync, MeshGenerationResult

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