[LayaAirIDE 2.0]TypeError: Cannot set property 'material' of undefined

this.unit3D = Laya.Loader.getRes("Unity/Unit.lh") as Laya.MeshSprite3D;
this.scene3D.addChild(this.unit3D);
        this.unit3D.transform.localScale = new Laya.Vector3(1, 1, 1);
this.unit3D.transform.translate(new Laya.Vector3(0, 0, 0)); 
        var material:Laya.UnlitMaterial = Laya.Loader.getRes("Unity/Assets/Materials/Materials.lmat") as Laya.UnlitMaterial;        
var unlitTexture:Laya.Texture2D = Laya.Loader.getRes("Images/BG_PopWindow.png") as Laya.Texture2D;
material.albedoTexture = unlitTexture;
this.unit3D.meshRenderer.material = material;
}ZV2}I(41`60F}`ZMXQL)9I.png
已邀请:

要回复问题请先

商务合作
商务合作