首页 > 编程语言 > 详细

在editor模式下遍历unity3d builtsetting中的场景

时间:2016-04-03 11:52:43      阅读:290      评论:0      收藏:0      [点我收藏+]

foreach (UnityEditor.EditorBuildSettingsScene S in UnityEditor.EditorBuildSettings.scenes)

{

//在built setting中是否已经开启

    if(S.enabled)

{

    

//得到场景的名称

                string name = S.path;

                //打开这个场景

EditorApplication.OpenScene(name);

//遍历场景中的GameObject

foreach (GameObject obj in Object.FindObjectsOfType(typeof(GameObject)))

{

}

}

}

在editor模式下遍历unity3d builtsetting中的场景

原文:http://568464209.blog.51cto.com/7726521/1759771

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!