以下の内容はhttps://baba-s.hatenablog.com/entry/2022/06/02/110000より取得しました。


【Unity】NativeArray の for を簡単に実装できるようにする Rider の Source Template

ソースコード

using JetBrains.Annotations;
using Unity.Collections;

public static class SourceTemplates
{
    [SourceTemplate]
    [Macro( Target = "index" )]
    [Macro( Target = "value" )]
    public static void @for<T>( this NativeArray<T> self ) where T : struct
    {
        for ( var index = 0; index < self.Length; index++ )
        {
            var value = self[ index ];
            //$ $END$
        }
    }
}

使用例




以上の内容はhttps://baba-s.hatenablog.com/entry/2022/06/02/110000より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14