Quantcast
Channel: Cocos中文社区 - 最新主题
Viewing all articles
Browse latest Browse all 88737

如何获取TiledMap的图层和对象层

$
0
0

@vostro1400 写道:

properties: {
roadPrefabs : {
default:[],
type:[cc.Prefab],
},
}

var tPrefab = cc.instantiate(this.roadPrefabs[4]);
var tTiledData = tPrefab.getComponent(cc.TiledMap);

tTiledData.getObjectGroup("groupName"); //null
tTiledData.getLayer("layerName"); //null

请问如何获取图层和对象层啊? 上边的2个获取方法全是null.

帖子: 1

参与者: 1

阅读整个主题


Viewing all articles
Browse latest Browse all 88737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>