Unity 2018.1.7がリリースされました。
What’s new in Unity 2018.1.7f1 – Unity
https://unity3d.com/unity/whatsnew/unity-2018.1.7
いくつかの不具合が修正されているようです。
Unity 2018.1を使っている人は更新しておくと良さそうです。
リンク
Unity – Download Archive
https://unity3d.com/get-unity/download/archive
Unity 2018.1.7がリリースされました。
What’s new in Unity 2018.1.7f1 – Unity
https://unity3d.com/unity/whatsnew/unity-2018.1.7
いくつかの不具合が修正されているようです。
Unity 2018.1を使っている人は更新しておくと良さそうです。
Unity – Download Archive
https://unity3d.com/get-unity/download/archive
Pythonを使っているとmapというリストの操作が便利です。
>>> a = list(range(5))
>>> a
[0, 1, 2, 3, 4]
>>> list(map(lambda e: e*2+1, a))
[1, 3, 5, 7, 9]
C#でもこれと同じようなことができないかと探してみたところ、LINQのSelectを使って同じような感じのコードが書けるみたいです。
using System;
using System.Linq;
public class Example
{
static public void Main ()
{
int[] a = new int[]{ 0, 1, 2, 3, 4 };
a = a.Select(e => e * 2 + 1).ToArray();
foreach(int v in a) {
Console.WriteLine(v);
}
}
}
実行結果
1
3
5
7
9
ruby – C# Array Map/Collect – Stack Overflow
https://stackoverflow.com/questions/2285496/c-sharp-array-map-collect
以前、Unityで作ったゲームのScreenshotMovieを作成できるスクリプトを試してみましたが、もう少し本格的に録画したい場合は「Unity Recorder」というアセットが良さそうな感じでした。
GitHub – Unity-Technologies/GenericFrameRecorder: Recorder framework that allows recording anything in unity.
https://github.com/Unity-Technologies/GenericFrameRecorder
こちらも連番画像ファイルの形式になりますので、必要に応じてFFmpegなどで動画ファイルに変換してください。
Recorder – Asset Store
https://assetstore.unity.com/packages/essentials/beta-projects/recorder-94079