Skip to content

Commit 0eeb3b4

Browse files
committed
updated MovieRecorder packaging
1 parent 889464e commit 0eeb3b4

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

source/FrameRecorder/Core/Editor/RecorderWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public void OnGUI()
7979
else
8080
{
8181
m_WindowSettingsAsset = ScriptableObject.CreateInstance<RecorderWindowSettings>();
82-
AssetDatabase.CreateAsset(m_WindowSettingsAsset, FRPackagerPaths.GetFrameRecorderRootPath() + "/RecorderWindowSettings.asset");
82+
AssetDatabase.CreateAsset(m_WindowSettingsAsset, FRPackagerPaths.GetRecorderRootPath() + "/RecorderWindowSettings.asset");
8383
AssetDatabase.Refresh();
8484
}
8585
}

source/FrameRecorder/Packager/Editor/FRPackagerPaths.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ namespace UnityEditor.Recorder
66
{
77
class FRPackagerPaths : ScriptableObject
88
{
9-
public static string GetFrameRecorderRootPath()
9+
public static string GetRecorderRootPath()
1010
{
1111
var path = GetFrameRecorderPath();
1212
path = path.Substring(path.IndexOf("Assets"));
1313
return path;
1414
}
1515

16-
public static string GetFrameRecorderVersionFilePath()
16+
public static string GetRecorderVersionFilePath()
1717
{
1818
var dummy = ScriptableObject.CreateInstance<RecorderVersion>();
1919
var path = Application.dataPath + AssetDatabase.GetAssetPath(MonoScript.FromScriptableObject(dummy)).Substring("Assets".Length);

source/FrameRecorder/Packager/Private/Editor/FRPackager.cs

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public static string GetFrameRecorderRootPath()
1212
{
1313
return Application.dataPath + "/Recorder/";
1414
}
15-
15+
/*
1616
[MenuItem("Tools/Recorder/Generate Framework Package", false,100)]
1717
static void GeneratePackage()
1818
{
@@ -31,12 +31,18 @@ static void GeneratePackage()
3131
AssetDatabase.ExportPackage(files, destFile, ExportPackageOptions.Recurse);
3232
Debug.Log("Generated package: " + destFile);
3333
}
34-
34+
*/
3535
[MenuItem("Tools/Recorder/Generate Assetstore package", false, 100)]
3636
static void GenerateAssetStorePackage()
3737
{
38-
var rootPath = FRPackagerPaths.GetFrameRecorderRootPath();
39-
38+
var rootPath = FRPackagerPaths.GetRecorderRootPath();
39+
var type = Type.GetType("UnityEditor.Recorder.MovieRecorderPackager");
40+
if (type != null)
41+
{
42+
var method = type.GetMethod("GeneratePackage");
43+
method.Invoke(null, null);
44+
AssetDatabase.Refresh();
45+
}
4046
UpdateVersion();
4147

4248
var files = new []
@@ -49,6 +55,7 @@ static void GenerateAssetStorePackage()
4955
Path.Combine(rootPath, "Framework/Packager/Editor" ),
5056
Path.Combine(rootPath, "Extensions/UTJ" ),
5157
Path.Combine(rootPath, "Extensions/FCIntegration" ),
58+
Path.Combine(rootPath, "Extensions/MovieRecorder/Packaging" ),
5259
};
5360
var destFile = k_PackageName + " " + RecorderVersion.Stage + " v"+ RecorderVersion.Version + ".unitypackage";
5461
AssetDatabase.ExportPackage(files, destFile, ExportPackageOptions.Recurse);
@@ -57,7 +64,7 @@ static void GenerateAssetStorePackage()
5764

5865
static void UpdateVersion()
5966
{
60-
var path = FRPackagerPaths.GetFrameRecorderVersionFilePath();
67+
var path = FRPackagerPaths.GetRecorderVersionFilePath();
6168
var script = File.ReadAllText(path);
6269

6370
var tag = "public const string Version = ";

0 commit comments

Comments
 (0)