diff --git a/cocos/core/data/deserialize.ts b/cocos/core/data/deserialize.ts index f039963603..cd6860edb1 100644 --- a/cocos/core/data/deserialize.ts +++ b/cocos/core/data/deserialize.ts @@ -569,7 +569,16 @@ class _Deserializer { let obj: any = null; // the obj to return let klass: any = null; const type = serialized.__type__; - if (type) { + if (type === 'TypedArray') { + const array = serialized.array; + // @ts-ignore + obj = new window[serialized.ctor](array.length); + for (let i = 0; i < array.length; ++i) { + obj[i] = array[i]; + } + return obj; + } + else if (type) { // Type Object (including CCClass) diff --git a/cocos/renderer/terrain/terrain.ts b/cocos/renderer/terrain/terrain.ts index b03c11582d..4c4c06f0b6 100644 --- a/cocos/renderer/terrain/terrain.ts +++ b/cocos/renderer/terrain/terrain.ts @@ -526,7 +526,7 @@ export class Terrain extends Component { @property({ type: TerrainLayer, - visible: false, + visible: true, }) protected _layers: Array = [];