醒着☆☆

H5 Laya Native Game

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: :: 管理 ::

设置layer :不要使用go.layer= intMM;
要使用Nguitool.Setlayer(go,intLayer);

static public void SetLayer (GameObject go, int layer)
{
    go.layer = layer;

    Transform t = go.transform;

    for (int i = 0, imax = t.childCount; i < imax; ++i)
    {
        Transform child = t.GetChild(i);
        SetLayer(child.gameObject, layer);
    }
}

 

posted on 2015-06-05 14:57  醒着/☆☆  阅读(162)  评论(0编辑  收藏  举报