fix serialize bug

This commit is contained in:
Leslie
2019-01-30 10:32:30 +08:00
parent 1474c2da2d
commit 212bbd9668
2 changed files with 6 additions and 1 deletions
@@ -174,5 +174,5 @@ export default class SkinningModelComponent extends ModelComponent {
function _getGlobalDevice (): GFXDevice | null {
// @ts-ignore
return cc.director.root.device;
return cc.director && cc.director.root && cc.director.device;
}
+5
View File
@@ -77,6 +77,11 @@ export class Texture2D extends TextureBase {
super(true);
}
onLoaded () {
super.onLoaded();
this.updateMipmaps();
}
/**
* Returns the string representation of this texture.
*/