Last active
October 24, 2018 11:15
-
-
Save shinriyo/5563889 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 UnityEngine; | |
using UnityEditor; | |
using System.Collections; | |
public class SceneSaveHook : AssetModificationProcessor | |
{ | |
static string[] OnWillSaveAssets (string[] paths) | |
{ | |
foreach (string path in paths) { | |
if (path.EndsWith (".unity")) { | |
GameObject sceneMergerGO = GameObject.Find ("Scene Merger"); | |
if (sceneMergerGO) { | |
SceneMerger merger = sceneMergerGO .GetComponent<SceneMerger> (); | |
merger.ClearOverlay (); | |
} | |
} | |
} | |
return paths; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Scene MergerのGameObjectが無いときの処理を入れた。