Improved nanny #3

merged 2 commits into from May 24, 2012


None yet
2 participants

ricardojmendez commented May 24, 2012

Hi Mike,

Here's something that might be an improvement or a bugfix, depending on how you look at it - the nanny wasn't properly handling destroyed transforms.

Ricardo J. M... added some commits May 24, 2012

Ricardo J. Mendez Added .pidb to the list of ignored files 2655512
Ricardo J. Mendez BUGFIX: Improved Nanny handling of destroyed transforms
Previously Tween.update() only checked with target == null, but in the
case of Transform tweens it is necessary to call the reference's Equals
method to ensure that we get the proper answer.

prime31 commented May 24, 2012

I had no clue null didn't mean null in some cases!

prime31 merged commit 358203e into prime31:master May 24, 2012


ricardojmendez commented May 24, 2012

Hehe. The thing is, your object transform reference is still not null, and is pointing to whatever the Unity Transform object is. I expect that when a transform is Destroy()'ed, they set some internal value on Transform to null, and have overridden Equals to verify if this value is null or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment