Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Created September 6, 2015 13:35
Show Gist options
  • Save tsubaki/9538f0fd0975feca6908 to your computer and use it in GitHub Desktop.
Save tsubaki/9538f0fd0975feca6908 to your computer and use it in GitHub Desktop.
LightProbeをシーンから出力する
using UnityEngine;
using System.Collections;
using UnityEditor;
using System.IO;
public class ExportLightprobe
{
[MenuItem("Export/Export LightProbe")]
static void Export()
{
var path = "Assets/" + Path.GetFileNameWithoutExtension (EditorApplication.currentScene);
Directory.CreateDirectory (path);
AssetDatabase.CreateAsset ( GameObject.Instantiate( LightmapSettings.lightProbes ), path + "/lightprobe.asset");
}
}
@tsubaki
Copy link
Author

tsubaki commented Dec 3, 2015

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