Skip to content

Instantly share code, notes, and snippets.

@sugi-cho
Created June 16, 2014 03:59
Show Gist options
  • Save sugi-cho/6aea1d6cec73cf4aed99 to your computer and use it in GitHub Desktop.
Save sugi-cho/6aea1d6cec73cf4aed99 to your computer and use it in GitHub Desktop.
拡張メソッド
using UnityEngine;
using System.Collections;
static class Extentions
{
public static Vector2 XY (this Vector3 vec3)
{
return new Vector2 (vec3.x, vec3.y);
}
public static Vector2 YZ (this Vector3 vec3)
{
return new Vector2 (vec3.y, vec3.z);
}
public static Vector2 ZX (this Vector3 vec3)
{
return new Vector2 (vec3.z, vec3.x);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment