Unity2017.1.0f3
https://github.com/Unity-Technologies/GenericFrameRecorder
↑これとffmpeg使って動画にしていたのですが、
Jenkins先生に動画にしてもらおうと思うとちょっと困ります。
https://docs.unity3d.com/jp/530/Manual/CommandLineArguments.html
例によってコマンドラインからUnity起動して云々なんですが、
-batchmodeにするとGameViewがそもそもないのです。
で、GenericFrameRecorderにも採用されてるよく見るコードに一工夫。
GameViewがなかったら作ればいいじゃない。
public static EditorWindow GetMainGameView()
{
System.Type T = System.Type.GetType("UnityEditor.GameView,UnityEditor");
System.Reflection.MethodInfo GetMainGameView = T.GetMethod("GetMainGameView", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static);
System.Object Res = GetMainGameView.Invoke(null, null);
if(Res == null)Res = EditorWindow.GetWindow(T);
return (EditorWindow)Res;
}
if(Res == null)Res = EditorWindow.GetWindow(T);
を追加しました。
あとWindowsのJenkinsは素の設定のままだとGUIアプリケーションが使えず、DirectXのあたりでこけてたので対処しました。
以下参考
http://toshimana.hatenablog.com/entry/2014/07/05/095613