- Movie recorder no longuer in a seperate package

- GameView "max on play" get's disabled when a recording starts
This commit is contained in:
jasonm-unity 2018-01-17 11:24:44 -05:00
Родитель 393c1e64a7
Коммит ffed79f678
6 изменённых файлов: 18 добавлений и 12 удалений

Просмотреть файл

@ -2,6 +2,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine.Recorder; using UnityEngine.Recorder;
using UnityEngine; using UnityEngine;
using UnityEngine.Recorder.Input;
namespace UnityEditor.Recorder namespace UnityEditor.Recorder
{ {
@ -257,6 +258,7 @@ namespace UnityEditor.Recorder
void StartRecording() void StartRecording()
{ {
m_State = EState.WaitingForPlayModeToStartRecording; m_State = EState.WaitingForPlayModeToStartRecording;
GameViewSize.DisableMaxOnPlay();
EditorApplication.isPlaying = true; EditorApplication.isPlaying = true;
m_FrameCount = Time.frameCount; m_FrameCount = Time.frameCount;
return; return;

Просмотреть файл

@ -8,7 +8,7 @@ namespace UnityEditor.Recorder
public class RecorderVersion : ScriptableObject public class RecorderVersion : ScriptableObject
{ {
public const string Version = "0.2"; // major.minor.build public const string Version = "0.2"; // major.minor.build
public static int BuildNumber = 27; public static int BuildNumber = 30;
public static string Tag public static string Tag
{ {
get { return string.Format("{0}.{1:0000}", Version, BuildNumber); } get { return string.Format("{0}.{1:0000}", Version, BuildNumber); }

Просмотреть файл

@ -1,4 +1,5 @@
using System; using System;
using UnityEngine.Recorder.Input;
namespace UnityEngine.Recorder namespace UnityEngine.Recorder
{ {

Просмотреть файл

@ -22,6 +22,17 @@ namespace UnityEngine.Recorder.Input
} }
public static void DisableMaxOnPlay()
{
var gameView = GetMainGameView();
if ((gameView.GetType().GetField("m_MaximizeOnPlay", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(gameView) as bool? )== true)
{
Debug.LogWarning("'Maximize on Play' not compatible wit recorder: disabling it!");
gameView.GetType().GetField("m_MaximizeOnPlay", BindingFlags.NonPublic | BindingFlags.Instance).SetValue(gameView, false);
}
}
public static void GetGameRenderSize(out int width, out int height) public static void GetGameRenderSize(out int width, out int height)
{ {
var gameView = GetMainGameView(); var gameView = GetMainGameView();

Просмотреть файл

@ -23,13 +23,6 @@ namespace UnityEditor.Recorder
static void GenerateAssetStorePackage() static void GenerateAssetStorePackage()
{ {
var rootPath = FRPackagerPaths.GetRecorderRootPath(); var rootPath = FRPackagerPaths.GetRecorderRootPath();
var type = Type.GetType("UnityEditor.Recorder.MovieRecorderPackager");
if (type != null)
{
var method = type.GetMethod("GeneratePackage");
method.Invoke(null, null);
AssetDatabase.Refresh();
}
UpdateVersion(1); UpdateVersion(1);
@ -43,7 +36,7 @@ namespace UnityEditor.Recorder
Path.Combine(rootPath, "Framework/Packager/Editor" ), Path.Combine(rootPath, "Framework/Packager/Editor" ),
Path.Combine(rootPath, "Extensions/UTJ" ), Path.Combine(rootPath, "Extensions/UTJ" ),
Path.Combine(rootPath, "Extensions/FCIntegration" ), Path.Combine(rootPath, "Extensions/FCIntegration" ),
Path.Combine(rootPath, "Extensions/MovieRecorder/Packaging" ), Path.Combine(rootPath, "Extensions/MovieRecorder" ),
}; };
var destFile = k_PackageName + " " + RecorderVersion.Stage + " v"+ RecorderVersion.Tag + ".unitypackage"; var destFile = k_PackageName + " " + RecorderVersion.Stage + " v"+ RecorderVersion.Tag + ".unitypackage";
AssetDatabase.ExportPackage(files, destFile, ExportPackageOptions.Recurse); AssetDatabase.ExportPackage(files, destFile, ExportPackageOptions.Recurse);

Просмотреть файл

@ -14,13 +14,12 @@ namespace UnityEditor.Experimental.FrameRecorder
{ {
private bool recorderSettings = false; private bool recorderSettings = false;
[MenuItem("Tools/Recorder/Animation")] [MenuItem("Tools/Recorder/Animation Clips")]
private static void ShowRecorderWindow() private static void ShowRecorderWindow()
{ {
RecorderWindow.ShowAndPreselectCategory("Animation"); RecorderWindow.ShowAndPreselectCategory("Animation Clips");
} }
protected override void OnInputGui() protected override void OnInputGui()
{ {
var aRecorderSettings = target as AnimationRecorderSettings; var aRecorderSettings = target as AnimationRecorderSettings;