Extending the Transform inspector

Here’s a script I put together for extending the Transform component’s inspector:

TransformInspector.cs (Unify wiki link)

This is a reverse engineered version of Unity’s built-in Transform inspector, so it should preserve both its appearance and behavior, bugs included (if there are any). Hopefully someone can get some use out of it.

I don’t have an immediate need for that, but it could prove useful, so thanks for adding it to the wiki.

I was just intrigued; I’ve never seen “IsNan” before. Why is the letter i captilazed? Seems like it breaks convention.

It means “Not a Number”, and is typically used when some expression doesn’t evaluate to a valid number.

.

I know what it means; that was obvious from the name. The spelling is what concerns me.

All function names are capitalized. i.e., there is both “animation.isPlaying” and “animation.IsPlaying()”.

–Eric

Ug. I missed that it was a method with my terrible cursory glance. (I read it like “if (v.x.IsNaN)”.) Google’s first hit when looking up “isnan” didn’t help bring my eyes back into reality. Does web JS not follow that convention?

Nope, it seems to use lowercase for function names.

–Eric

That’s quite annoying. Any reason for it, or did JS feel like being a odd man out?

The .NET convention is to begin function names with capital letters but web JS (and most other things) have tended to use lowercase letters for this.

I always hated the lowercase first letters for functions, properties or any variables. It’s so ugly and has no sense. I love Unity but I’m so sorry that the unity developers followed that convention. If they were to follow .NET convention, they should have followed it for all names. Not only for function names.

Maybe no one noticed but lowercased member names breaks the visual studio’s IntelliSence alphabetical sorting and I hate it.

Correct url is this : http://wiki.unity3d.com/wiki/index.php?title=TransformInspector