Transform.hasChanged

var hasChanged : boolean

Description

Has the transform changed since the last time the flag was set to 'false'?

A change to the transform can be anything that causes its matrix to be recalculated: any adjustment to its position, rotation or scale.

JavaScript
    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

class example(MonoBehaviour):

def OnUpdate():
if transform.hasChanged:
print('The transform has changed!')
transform.hasChanged = false