ソースコード
using UnityEngine; public static class Vector2IntExt { public static void Deconstruct ( this Vector2Int self, out int x, out int y ) { x = self.x; y = self.y; } }
使用例
通常
var vec = new Vector2Int( 1, 2 );
Deconstruction
var ( x, y ) = new Vector2Int( 1, 2 );