prefab bug fix 2

This commit is contained in:
2015-08-29 22:37:40 +06:00
parent d83fe0f094
commit 41574c293a
4 changed files with 10 additions and 15 deletions

View File

@@ -210,7 +210,7 @@ namespace IsoTools {
IsoWorld _isoWorld = null;
public IsoWorld isoWorld {
get {
if ( !_isoWorld ) {
if ( !_isoWorld && gameObject.activeInHierarchy ) {
_isoWorld = GameObject.FindObjectOfType<IsoWorld>();
}
return _isoWorld;
@@ -292,10 +292,8 @@ namespace IsoTools {
}
void OnValidate() {
if ( gameObject.activeInHierarchy ) {
size = _size;
position = _position;
}
size = _size;
position = _position;
}
void OnDrawGizmos() {