[]Uncaught TypeError: Cannot read property 'props' of undefined
按照官方提供的代码,导入从unity导出的场景,出现此错误,代码如下
var Main = (function ()
{
function Main()
{
//初始化引擎
Laya3D.init(0, 0,true);
Laya.stage.scaleMode = Laya.Stage.SCALE_FULL;
Laya.stage.screenMode = Laya.Stage.SCREEN_NONE;
Laya.Stat.show();
//添加3D场景
Laya.Scene3D.load("LayaScene_Laya3D01/Laya3D01.ls",Laya.Handler.create(null,function(scene){
Laya.stage.addChild(scene);
//创建摄像机(横纵比,近距裁剪,远距裁剪)
var camera= new Laya.Camera( 0, 0.1, 1000);
//加载到场景
scene.addChild(camera);
//移动摄像机位置
camera.transform.position=new Laya.Vector3(-8, 4, 15);
//旋转摄像机角度
camera.transform.rotate(new Laya.Vector3( -8, -25, 0), true, false);
}))
}
return Main;
} ());
Main();
laya2.0的3d尝试,新人,看不懂这是为啥,错误如下:
laya.d3.js:15290 Uncaught TypeError: Cannot read property 'props' of undefined
at Function.Laya3D._getSprite3DHierarchyInnerUrls (laya.d3.js:15290)
at Loader.Laya3D._onHierarchylhLoaded (laya.d3.js:15384)
at EventHandler.__proto.runWith (laya.core.js:1156)
at Loader.__proto.event (laya.core.js:911)
at Loader.__proto.complete (laya.core.js:14555)
at Loader.__proto.onLoaded (laya.core.js:14523)
at EventHandler.__proto.runWith (laya.core.js:1155)
at HttpRequest.__proto.event (laya.core.js:911)
at HttpRequest.__proto.complete (laya.core.js:14196)
at HttpRequest.__proto._onLoad (laya.core.js:14160)
var Main = (function ()
{
function Main()
{
//初始化引擎
Laya3D.init(0, 0,true);
Laya.stage.scaleMode = Laya.Stage.SCALE_FULL;
Laya.stage.screenMode = Laya.Stage.SCREEN_NONE;
Laya.Stat.show();
//添加3D场景
Laya.Scene3D.load("LayaScene_Laya3D01/Laya3D01.ls",Laya.Handler.create(null,function(scene){
Laya.stage.addChild(scene);
//创建摄像机(横纵比,近距裁剪,远距裁剪)
var camera= new Laya.Camera( 0, 0.1, 1000);
//加载到场景
scene.addChild(camera);
//移动摄像机位置
camera.transform.position=new Laya.Vector3(-8, 4, 15);
//旋转摄像机角度
camera.transform.rotate(new Laya.Vector3( -8, -25, 0), true, false);
}))
}
return Main;
} ());
Main();
laya2.0的3d尝试,新人,看不懂这是为啥,错误如下:
laya.d3.js:15290 Uncaught TypeError: Cannot read property 'props' of undefined
at Function.Laya3D._getSprite3DHierarchyInnerUrls (laya.d3.js:15290)
at Loader.Laya3D._onHierarchylhLoaded (laya.d3.js:15384)
at EventHandler.__proto.runWith (laya.core.js:1156)
at Loader.__proto.event (laya.core.js:911)
at Loader.__proto.complete (laya.core.js:14555)
at Loader.__proto.onLoaded (laya.core.js:14523)
at EventHandler.__proto.runWith (laya.core.js:1155)
at HttpRequest.__proto.event (laya.core.js:911)
at HttpRequest.__proto.complete (laya.core.js:14196)
at HttpRequest.__proto._onLoad (laya.core.js:14160)
没有找到相关结果
已邀请:
要回复问题请先登录
4 个回复
liqiucheng008
赞同来自: 源
下载地址http://ldc.layabox.com/download/2.0.0beta1/unityplugin/LayaAirUnityPlugin_beta.unitypackage
赞同来自:
煮饭烫伤手
赞同来自:
夜未央
赞同来自: