载入中...
搜索中...
未找到
UnityNativeTexture.cpp
浏览该文件的文档.
51 DiagnosticCode::Unsupported, "native asset is not a text Texture2D", source.path, {}, "asset.import"));
59 DiagnosticCode::Unsupported, "requires embedded BC3 Texture2D with one image and known color space",
72 if (expected > request.limits.maximumDecodedBytes || expected != number(text, "m_CompleteImageSize") ||
90 std::span(blocks).subspan(blockOffset, std::size_t(levelBytes)), std::uint32_t(w), std::uint32_t(h),
105 auto png = asset::detail::encodeSourcePng(std::uint32_t(width), std::uint32_t(height), basePixels,
116 auto parsed = Value::fromJson(std::string(definitionEntry.bytes.begin(), definitionEntry.bytes.end()));
123 const auto newBlob = definitionEntry.path.substr(0, definitionEntry.path.rfind('/') + 1) + "source.rgba8-mips";
143 Diagnostic::error(DiagnosticCode::InvalidArgument, error.what(), source.path, {}, "asset.import"));
Direct Unity text-serialization adapter for TerrainData and Prefab assets.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
static Result< Value > fromJson(std::string_view json)
Parse one strict JSON value into an owning Value.
Definition Value.cpp:57
Id128 child(std::string_view role) const noexcept
Derives a deterministic child UUID for a hierarchical identity.
Definition Identity.h:192
Result< std::vector< std::uint8_t > > encodeSourcePng(std::uint32_t width, std::uint32_t height, std::span< const std::uint8_t > pixels, std::uint64_t maximumBytes)
Encode top-down RGBA8 source pixels without transfer conversion.
Definition SourcePng.cpp:6
Result< std::vector< std::uint8_t > > decodeBc3Rgba8(std::span< const std::uint8_t > bytes, std::uint32_t width, std::uint32_t height, std::uint64_t maximumDecodedBytes)
Decode one BC3/DXT5 mip level into tightly packed RGBA8 in source row order.
Definition SourceBc3.cpp:6
Definition AssetImporter.h:14
@ Translated
Result< PreparedAssetImport > prepareUnityNativeTexture(const UnityProjectImportRequest &request, const UnitySourceAsset &source)
Convert embedded BC3 text Texture2D to an owning image candidate.
Definition UnityNativeTexture.cpp:45
EVENGINE_API_PLATFORM Result< PreparedAssetImport > prepareImageImport(const ImageImportRequest &request)
Decode image metadata and prepare one canonical eve.image source asset.
Definition ImageImporter.cpp:80
const EditorValue * field(const EditorValue &value, const char *name)
Definition RoadNetworkEditTarget.cpp:15
@ InvalidArgument
@ Unsupported
@ ParseError
std::uint64_t maximumDecodedBytes
Definition AssetImporter.h:19
ImportPackageIdentity package
Definition AssetImporter.h:55
PersistentId packageId
Definition AssetImporter.h:34
In-memory Unity project slice; keys are normalized project-relative paths.
Definition UnityImporter.h:15
Immutable-by-convention owning source index entry; no borrowed source addresses.
Definition UnitySource.h:38