Files
XCEngine/docs/api/resources/mesh/get-path.md

702 B

Mesh::GetPath

const Containers::String& GetPath() const override;

返回网格资源的路径。路径用于资源定位和唯一标识。

参数:

返回: const Containers::String& - 资源路径的引用

异常:

线程安全:

复杂度: O(1)

示例:

#include "XCEngine/Resources/Mesh.h"

using namespace XCEngine::Resources;

Mesh mesh;
IResource::ConstructParams params;
params.name = "Character_Hero";
params.path = "assets/meshes/hero.mesh";
params.guid = ResourceGUID::Generate(params.path);
mesh.Initialize(params);

const String& path = mesh.GetPath();

相关文档