mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
fix terrain-asset load invalid data (#8726)
Co-authored-by: Myway3D1 <404793124@qq.com>
This commit is contained in:
@@ -413,6 +413,10 @@ export class TerrainAsset extends Asset {
|
||||
}
|
||||
|
||||
public _loadNativeData (_nativeData: Uint8Array) {
|
||||
if (!_nativeData || _nativeData.length === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const stream = new TerrainBuffer();
|
||||
stream.assign(_nativeData);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user