Has the transform changed since the last time the flag was set to 'false'?
function OnUpdate () { if (transform.hasChanged) { print("The transform has changed!"); transform.hasChanged = false; } }
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void OnUpdate() { if (transform.hasChanged) { print("The transform has changed!"); transform.hasChanged = false; } } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): def OnUpdate() as void: if transform.hasChanged: print('The transform has changed!') transform.hasChanged = false