- 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 UnityEngine.Recorder;
using UnityEngine;
using UnityEngine.Recorder.Input;
namespace UnityEditor.Recorder
{
@ -257,6 +258,7 @@ namespace UnityEditor.Recorder
void StartRecording()
{
m_State = EState.WaitingForPlayModeToStartRecording;
GameViewSize.DisableMaxOnPlay();
EditorApplication.isPlaying = true;
m_FrameCount = Time.frameCount;
return;

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

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

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

@ -1,4 +1,5 @@
using System;
using UnityEngine.Recorder.Input;
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)
{
var gameView = GetMainGameView();

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

@ -23,13 +23,6 @@ namespace UnityEditor.Recorder
static void GenerateAssetStorePackage()
{
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);
@ -43,7 +36,7 @@ namespace UnityEditor.Recorder
Path.Combine(rootPath, "Framework/Packager/Editor" ),
Path.Combine(rootPath, "Extensions/UTJ" ),
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";
AssetDatabase.ExportPackage(files, destFile, ExportPackageOptions.Recurse);

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

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