Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
シーン保存時に実行される
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;
}
}
@shinriyo
Copy link
Author

shinriyo commented May 16, 2013

Scene MergerのGameObjectが無いときの処理を入れた。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment