fix problem with disable/enable IsoObject in play mode

This commit is contained in:
2016-12-30 16:37:06 +07:00
parent 336e2aecb9
commit f0ff0b16f8
2 changed files with 6 additions and 6 deletions

View File

@@ -38,8 +38,8 @@ Transform:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 180122}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 2.2000008, y: -3.3, z: 1.3000001}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 2.1976166, y: -3.2986054, z: 3.299999}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 490734}
@@ -71,9 +71,9 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
_size: {x: 1, y: 1, z: 1}
_position: {x: -1, y: -2, z: 0}
_mode: 0
_cacheRenderers: 1
_position: {x: -3, y: 2, z: 0}
_renderersMode: 0
_cachedRenderers: 0
--- !u!212 &21210794
SpriteRenderer:
m_ObjectHideFlags: 1

View File

@@ -150,7 +150,7 @@ namespace IsoTools.Internal {
void DirtyTargetPositions() {
var iso_object = targets.Length == 1 ? target as IsoObject : null;
if ( iso_object && iso_object.IsActive() ) {
if ( iso_object && iso_object.IsActive() && !Application.isPlaying ) {
var position_prop = serializedObject.FindProperty("_position");
if ( position_prop != null && !position_prop.prefabOverride ) {
var last_value = position_prop.vector3Value;