Created
March 27, 2017 14:43
-
-
Save tsubaki/23f77c2d8f37d3f8f92ccd63a5408944 to your computer and use it in GitHub Desktop.
各シーンに処理を行う
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEditor.Build; | |
using UnityEditor.Callbacks; | |
using UnityEditor; | |
using UnityEngine.UI; | |
public class Processor : IProcessScene { | |
public void OnProcessScene (UnityEngine.SceneManagement.Scene scene) | |
{ | |
foreach (var light in GameObject.FindObjectsOfType<Light>()) { | |
if( light.isBaked ) | |
GameObject.DestroyImmediate (light.gameObject); | |
} | |
foreach (var obj in scene.GetRootGameObjects()) { | |
if (obj.GetComponent<Canvas> () == null) | |
obj.transform.DetachChildren (); | |
} | |
} | |
// 実行順 | |
public int callbackOrder { get { return 0; } } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment