mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
fix serialize bug
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -77,6 +77,11 @@ export class Texture2D extends TextureBase {
|
||||
super(true);
|
||||
}
|
||||
|
||||
onLoaded () {
|
||||
super.onLoaded();
|
||||
this.updateMipmaps();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the string representation of this texture.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user