载入中...
搜索中...
未找到
UnitySource.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
8
9namespace eve::asset_import {
10
12using UnitySourceFiles = std::map<std::string, std::vector<std::uint8_t>>;
13
15enum class UnitySourceKind : std::uint8_t {
16 Folder,
17 Prefab,
18 Scene,
19 Model,
21 Image,
23 Audio,
24 Font,
25 Shader,
26 Script,
27 Data,
28 Other,
29};
30
33 std::string guid;
34 std::int64_t fileId = 0;
35};
36
39 std::string path;
40 std::string guid;
42 std::string importer;
43 std::vector<UnitySourceReference> references;
44};
45
48 std::vector<UnitySourceAsset> assets;
49 std::vector<ImportFinding> findings;
50};
51
60[[nodiscard]] EVENGINE_API_PLATFORM Result<UnitySourceFiles> readUnityPackage(std::span<const std::uint8_t> bytes,
61 const AssetImportLimits& limits = {});
62
74 const AssetImportLimits& limits = {});
75
76} // namespace eve::asset_import
Tool-side image and glTF importers producing canonical .eva candidates.
#define EVENGINE_API_PLATFORM
Definition Export.h:107
std::uint64_t bytes
const AssetImportLimits & limits
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Result< UnitySourceFiles > readUnityPackage(std::span< const std::uint8_t > bytes, const AssetImportLimits &limits)
Decode a gzip/tar .unitypackage into project-relative source bytes without extraction.
std::map< std::string, std::vector< std::uint8_t > > UnitySourceFiles
Owning project-relative source bytes, including the original .meta files.
Definition UnitySource.h:12
UnitySourceKind
Source category; classification does not imply runtime conversion support.
Definition UnitySource.h:15
Result< UnitySourceIndex > indexUnitySources(const UnitySourceFiles &files, const AssetImportLimits &limits)
Validate project paths and .meta identities and index serialized GUID/fileID references.
Parser and allocation budgets applied to untrusted importer inputs.
Immutable-by-convention owning source index entry; no borrowed source addresses.
Definition UnitySource.h:38
std::vector< UnitySourceReference > references
Definition UnitySource.h:43
Owning deterministic index sorted by path, plus missing-reference diagnostics.
Definition UnitySource.h:47
std::vector< ImportFinding > findings
Definition UnitySource.h:49
std::vector< UnitySourceAsset > assets
Definition UnitySource.h:48
External serialized object identity. fileId is signed, as in Unity serialization.
Definition UnitySource.h:32