void OnEnable() { this.tileMapObj = target as TileMapObject; if (!IsPrefabTarget() && tileMapObj != null) { tileMapObj.UpdateRotateAnchorPos(); } }
public override void OnInspectorGUI() { DrawDefaultInspector(); if (GUI.changed) { TileMapObject tileMapObj = target as TileMapObject; if (!IsPrefabTarget()) { tileMapObj.UpdateRotateAnchorPos(); tileMapObj.UpdateDirection(); } } }