mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-13 15:52:03 +07:00
Return scale and rotation by warning detection
This commit is contained in:
@@ -102,6 +102,12 @@ namespace IsoTools.Internal {
|
|||||||
Debug.LogWarning(
|
Debug.LogWarning(
|
||||||
"Don't change 'transform.scale' for IsoObject and its parents!",
|
"Don't change 'transform.scale' for IsoObject and its parents!",
|
||||||
iso_object);
|
iso_object);
|
||||||
|
var trans_iter = iso_object.transform;
|
||||||
|
while ( trans_iter ) {
|
||||||
|
trans_iter.localScale = Vector3.one;
|
||||||
|
trans_iter = trans_iter.parent;
|
||||||
|
}
|
||||||
|
iso_object.FixTransform();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,6 +116,12 @@ namespace IsoTools.Internal {
|
|||||||
Debug.LogWarning(
|
Debug.LogWarning(
|
||||||
"Don't change 'transform.rotation' for IsoObject and its parents!",
|
"Don't change 'transform.rotation' for IsoObject and its parents!",
|
||||||
iso_object);
|
iso_object);
|
||||||
|
var trans_iter = iso_object.transform;
|
||||||
|
while ( trans_iter ) {
|
||||||
|
trans_iter.localRotation = Quaternion.identity;
|
||||||
|
trans_iter = trans_iter.parent;
|
||||||
|
}
|
||||||
|
iso_object.FixTransform();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user