Marks target
object as dirty.
#pragma strict // This example shows a custom inspector for an // object "MyPlayerEditor", which has two variables, speed and ammo. @CustomEditor(MyPlayer) class MyPlayerEditor extends Editor { function OnInspectorGUI() { var targetPlayer = target as MyPlayer; EditorGUILayout.LabelField ("Some help", "Some other text"); GUI.changed = false; targetPlayer.speed = EditorGUILayout.Slider ("Speed", targetPlayer.speed, 0, 100); if (GUI.changed) EditorUtility.SetDirty(targetPlayer); } }