Skip to content

Instantly share code, notes, and snippets.

@david-hodgetts
Created December 18, 2014 08:10
Show Gist options
  • Save david-hodgetts/028a110cbe0db770f65e to your computer and use it in GitHub Desktop.
Save david-hodgetts/028a110cbe0db770f65e to your computer and use it in GitHub Desktop.
Unity: show global transform in editor
using UnityEngine;
using System.Collections;
[ExecuteInEditMode]
public class ShowGlobals : MonoBehaviour {
public Vector3 globalPosition;
public Vector3 globalRotation;
void Update () {
globalPosition = transform.position;
globalRotation = transform.rotation.eulerAngles;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment