Version: 2022.3
言語: 日本語
public void GenerateMeshAsync (XR.MeshId meshId, Mesh mesh, MeshCollider meshCollider, XR.MeshVertexAttributes attributes, Action<MeshGenerationResult> onMeshGenerationComplete);

パラメーター

meshId The MeshId of the mesh you wish to generate.
mesh The Mesh to write the results into.
meshCollider (Optional) The MeshCollider to populate with physics data. This may be null.
attributes The vertex attributes you'd like to use.
onMeshGenerationComplete The delegate to invoke when the generation completes.

説明

Requests the generation of the Mesh with MeshId meshId. Unity calls onMeshGenerationComplete when generation finishes.

Use this method to request that a mesh is asynchronously generated. "Generation" includes extracting the mesh data from the subsystem's mesh provider (e.g., an AR device) and baking the MeshCollider (if meshCollider is not null).

This happens in a background thread. For large meshes, this can take several frames to complete. onMeshGenerationComplete is invoked when the generation completes.

The mesh vertices are provided in session space.

See Also: XRMeshSubsystem.TryGetMeshInfos


public void GenerateMeshAsync (XR.MeshId meshId, Mesh mesh, MeshCollider meshCollider, XR.MeshVertexAttributes attributes, Action<MeshGenerationResult> onMeshGenerationComplete, XR.MeshGenerationOptions options);

パラメーター

meshId The MeshId of the mesh you wish to generate.
mesh The Mesh to write the results into.
meshCollider (Optional) The MeshCollider to populate with physics data. This may be null.
attributes The vertex attributes you'd like to use.
onMeshGenerationComplete The delegate to invoke when the generation completes.
options The mesh generation options.

説明

Requests the generation of the Mesh with MeshId meshId. Unity calls onMeshGenerationComplete when generation finishes.

This variant allows you to specify additional mesh generation options.

Note: If the MeshGenerationOptions.ConsumeTransform flag is set in the options argument, the resulting mesh will be relative to the transform provided by the MeshGenerationResult. If this flag is not set, the vertices are transformed into session space and the MeshGenerationResult will contain an identity transform.

See Also: XRMeshSubsystem.TryGetMeshInfos

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