sea.getRawAsset(key)
此方法可用于检索配置为在构建时打包到单个可执行应用中的资源。当找不到匹配的资源时会抛出错误。
¥This method can be used to retrieve the assets configured to be bundled into the single-executable application at build time. An error is thrown when no matching asset can be found.
与 sea.getAsset()
或 sea.getAssetAsBlob()
不同,此方法不返回副本。相反,它返回打包在可执行文件内的原始资源。
¥Unlike sea.getAsset()
or sea.getAssetAsBlob()
, this method does not
return a copy. Instead, it returns the raw asset bundled inside the executable.
目前,用户应避免写入返回的数组缓冲区。如果注入的部分未标记为可写或未正确对齐,则写入返回的数组缓冲区可能会导致崩溃。
¥For now, users should avoid writing to the returned array buffer. If the injected section is not marked as writable or not aligned properly, writes to the returned array buffer is likely to result in a crash.
-
key
<string> 单一可执行应用配置中的assets
字段指定的字典中资源的键。¥
key
<string> the key for the asset in the dictionary specified by theassets
field in the single-executable application configuration. -
¥Returns: <ArrayBuffer>