Improved nanny #3

Merged
merged 2 commits into from May 24, 2012

Conversation

Projects
None yet
2 participants
Contributor

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.
c4d477f
Owner

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

Contributor

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