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