以下の内容はhttps://baba-s.hatenablog.com/entry/2019/09/03/230600より取得しました。


【C#】Vector3Int の代入を簡略化する Deconstruction

ソースコード

using UnityEngine;

public static class Vector3IntExt
{
    public static void Deconstruct
    (
        this Vector3Int self,
        out  int        x,
        out  int        y,
        out  int        z
    )
    {
        x = self.x;
        y = self.y;
        z = self.z;
    }
}

使用例

通常

var vec = new Vector3Int( 1, 2, 3 );

Deconstruction

var ( x, y, z ) = new Vector3Int( 1, 2, 3 );



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

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