This fix is for issue #26. It turns out the issue is caused by Json deserialization of the object. I wasn't able to pinpoint exactly where at in the deseiralization the scale was becoming changed but the lines of code I implemented should fix the issue. Oddly enough, the 2nd tier child in the hierarchy was where the issue was manifesting from.
In addition to the scale issue, the rotation of the object was off as well. Implemented a fix for that as well
With these changes, it might be better to change up the EngineObject.Instantiate() to return a GameObject instead of an engineObject to reduce the amount of casting in the other methods. I noticed the Instantiate() method is only being called in the hierarchy so it wouldn't be too hard to implement. Let me know if that's something you want me to implement or if there's anything I'm missing.
This fix is for issue #26. It turns out the issue is caused by Json deserialization of the object. I wasn't able to pinpoint exactly where at in the deseiralization the scale was becoming changed but the lines of code I implemented should fix the issue. Oddly enough, the 2nd tier child in the hierarchy was where the issue was manifesting from.
In addition to the scale issue, the rotation of the object was off as well. Implemented a fix for that as well
With these changes, it might be better to change up the
EngineObject.Instantiate()
to return a GameObject instead of an engineObject to reduce the amount of casting in the other methods. I noticed theInstantiate()
method is only being called in the hierarchy so it wouldn't be too hard to implement. Let me know if that's something you want me to implement or if there's anything I'm missing.