Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void SetX(GameObject go, float x) {
- Vector3 v = go.transform.position;
- v.x = x;
- go.transform.position = v;
- }
- public static void SetY(GameObject go, float y) {
- Vector3 v = go.transform.position;
- v.y = y;
- go.transform.position = v;
- }
- public static void SetZ(GameObject go, float z) {
- Vector3 v = go.transform.position;
- v.z = z;
- go.transform.position = v;
- }
- public static void SetLocalX(GameObject go, float x) {
- Vector3 v = go.transform.localPosition;
- v.x = x;
- go.transform.localPosition = v;
- }
- public static void SetLocalY(GameObject go, float y) {
- Vector3 v = go.transform.localPosition;
- v.y = y;
- go.transform.localPosition = v;
- }
- public static void SetLocalZ(GameObject go, float z) {
- Vector3 v = go.transform.localPosition;
- v.z = z;
- go.transform.localPosition = v;
- }
- public static void SetScaleX(GameObject go, float x) {
- Vector3 v = go.transform.localScale;
- v.x = x;
- go.transform.localScale = v;
- }
- public static void SetScaleY(GameObject go, float y) {
- Vector3 v = go.transform.localScale;
- v.y = y;
- go.transform.localScale = v;
- }
- public static void SetScaleZ(GameObject go, float z) {
- Vector3 v = go.transform.localScale;
- v.z = z;
- go.transform.localScale = v;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement