Are official Unity examples often filled with errors?
Is it just me, or is a large part of the Unity official documentation samples still broke in C# ? (please tell me there's a big button that I am missing ;)
I cannot get any of these examples to make any sense in C# (they might work Java, but that's not me, and I press to show C#)
https://docs.unity3d.com/ScriptReference/EditorGUILayout.BeginScrollView.html
http://docs.unity3d.com/ScriptReference/Selection-activeTransform.html
https://docs.unity3d.com/ScriptReference/EditorGUI.TextField.html
etc..
And there are mostly still no comments in the C# examples that are working? Those appears to be very, very old Unity documentation issues? I tried various browsers etc, no luck.
Answer by Dave-Carlile · Jul 21, 2016 at 12:15 PM
It looks like the C#/JavaScript button that's supposed to toggle between the two doesn't have any effect on those. Could be that they just don't have C# sample code for them since there are other places where those buttons work. It's not too difficult to convert between the two yourself though. That's kind of the nature of this sort of thing.
I feel like I remember the older (3+ years?) documentation was written only in unityscript -- that was the preferred language back then. They didn't even have a button, or C# examples.
That sounds nuts, now, but back in the day it was common for game engines to use a specially-written non-standard language.
Yeah, I would imagine they just haven't converted all of the examples yet.
Answer by Fritsl · Jul 22, 2016 at 08:29 PM
https://docs.unity3d.com/ScriptReference/EditorGUI.DrawPreviewTexture.html
Is also not a working example .. is all I have to say to that.
https://docs.unity3d.com/$$anonymous$$anual/class-GUISkin.html
not working either!
Those are great examples of what I was writing about -- things that are clearly obsolete. Not just written in unityscript, but editor scripts in unityscript. Looks like they were added back when those were an undocumented feature (I assume -- the examples are way too long for where they are.)
Back in the day, Unity's target audience was experienced game developers, looking to switch from some other engine. As it became more well-known, I feel like they made a half-hearted effort to guide beginners, so you get some funny mixes of examples.
Answer by Firedan1176 · Jul 30, 2016 at 02:30 AM
Unity rarely update the documentation errors. They've been there for a long time, and there's never optimal examples, and rarely do you see JavaScript AND C# examples. You can submit requests for individual pages by going to the Editor > Help > Report a Bug... And selecting the first one as Services. However, keep in mind that the Unity staff is always busy and if they ever review your request, give them at least a week or two.
In my personal opinion, the documentation should be opened for select few community members to edit, not just Unity staff, just for the sole purpose of those examples. The only problem is trust issues...
Yes, sending them in through the bug reporter is the way we handle those.