-
-
Save AlexMeesters/1b121ba66e52f009952c82f69f5e3e50 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public static class TransformExtentions | |
{ | |
public static void SetX(this Transform transform, float x) | |
{ | |
transform.position = new Vector3(x, transform.position.y, transform.position.z); | |
} | |
public static void SetY(this Transform transform, float y) | |
{ | |
transform.position = new Vector3(transform.position.x, y, transform.position.z); | |
} | |
public static void SetZ(this Transform transform, float z) | |
{ | |
transform.position = new Vector3(transform.position.x, transform.position.y, z); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment