mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 07:42:38 +08:00
Remove asset release logic from terrain (#5079)
This commit is contained in:
committed by
Weiliang Wang
parent
b134b8db10
commit
932663c8f4
@@ -224,7 +224,7 @@ export class Texture2D extends SimpleTexture {
|
||||
* @deprecated 请转用 `this.destroy()`。
|
||||
*/
|
||||
public releaseTexture () {
|
||||
this.mipmaps = [];
|
||||
this.destroy();
|
||||
}
|
||||
|
||||
public _serialize (exporting?: any): any {
|
||||
|
||||
@@ -15,7 +15,6 @@ import { GFXDevice } from '../../gfx/device';
|
||||
import { IGFXAttribute } from '../../gfx/input-assembler';
|
||||
import { Model } from '../../renderer/scene/model';
|
||||
import { Node } from '../../scene-graph/node';
|
||||
import { INode } from '../../core/utils/interfaces';
|
||||
import { PrivateNode } from '../../scene-graph/private-node';
|
||||
import { IDefineMap } from '../core/pass';
|
||||
import { HeightField } from './height-field';
|
||||
@@ -721,13 +720,6 @@ export class Terrain extends Component {
|
||||
|
||||
public onDestroy () {
|
||||
for (let i = 0; i < this._layers.length; ++i) {
|
||||
const layer = this._layers[i];
|
||||
if (layer != null) {
|
||||
if (layer.detailMap != null) {
|
||||
//cc.loader.release(layer.detailMap);
|
||||
}
|
||||
}
|
||||
|
||||
this._layers[i] = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user