雑記
レイヤー設定と共にパッケージを作成したい機会があったので。
問題ないかは不明。
http://myoujing.wpblog.jp/2014/03/274/
こちらを参考にしましたが、余計なdll等も含まれてしまったため
以下のようにしてみました。
#if UNITY_EDITOR
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class ExportSetting : MonoBehaviour
{
[MenuItem("Assets/ExportWithSettings")]
static void Export()
{
string[] assetPaths = {
"Assets/含めたいフォルダー",
"ProjectSettings/AudioManager.asset",
"ProjectSettings/ClusterInputManager.asset",
"ProjectSettings/DynamicsManager.asset",
"ProjectSettings/EditorBuildSettings.asset",
"ProjectSettings/GraphicsSettings.asset",
"ProjectSettings/InputManager.asset",
"ProjectSettings/NavMeshAreas.asset",
"ProjectSettings/NetworkManager.asset",
"ProjectSettings/Physics2DSettings.asset",
"ProjectSettings/ProjectSettings.asset",
"ProjectSettings/QualitySettings.asset",
"ProjectSettings/TagManager.asset",
"ProjectSettings/TimeManager.asset",
"ProjectSettings/UnityConnectSettings.asset"
};
string exportPath = "test.unitypackage";
AssetDatabase.ExportPackage(assetPaths, exportPath, ExportPackageOptions.Interactive | ExportPackageOptions.Recurse);
}
}
#endif
ProjectSettingsは再帰で読まれなかった。
#環境
Unity 2017 4.2.8f1