Create a gist now

Instantly share code, notes, and snippets.

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