Skip to content

Instantly share code, notes, and snippets.

@AldeRoberge
Created January 22, 2022 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AldeRoberge/c671fabb343e3d8c1fdc65b16c7656ef to your computer and use it in GitHub Desktop.
Save AldeRoberge/c671fabb343e3d8c1fdc65b16c7656ef to your computer and use it in GitHub Desktop.
Allows to clone a Vector3 using an extension method.
using UnityEngine;
namespace MV_Archetype_Utils
{
public static class Vector3Ext
{
// Clone a Vector3
public static Vector3 Clone(this Vector3 v)
{
return new Vector3(v.x, v.y, v.z);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment