It's great that there's finally a more visible button to post code snippets. Having it inside Insert... is just too well hidden for most users. However, why can't it use the CODE tag instead of ICODE? Maybe it's just me, but ICODE actually makes code less readable because long lines just get cut off. Example from this thread: https://forum.unity.com/threads/ijob-not-changing-an-integer-when-it-runs.520507/
Looks like it got deployed to live unintentionally - it's an unfinished formatting feature. It's supposed to be for just inline code, like mentioning a variable mid sentence. For big code blocks, you'd still use the Insert->Code method
Insert->Code is too hidden though. Before this new button came along, new users in the scripting forum didn't format code at all. Now new users in the scripting forum are using this ICODE formatting because they want to format, they just didn't know there's a better way to do it.
Could you please, please take it out until it's ready? Right now all new users press it as it's easier to find, so we get garbage like this, where a bunch of the poor sod's code has been cropped out. Making people post code properly is already hard enough, and you just made it harder. "Please use code tags. No, not the code tags that are easy to find, the other ones".
Why don't they simply remove one letter from the tag inserted by that button? That would solve everything with basically no effort. The real solution is of course to make the four functions under "Insert…" actual buttons on the bar, and instead put alignment options under a foldout menu to make the bar less busy. The code button should also have some qualifier to imply it's the one you want, like "Insert block of code".
I confess that I'm actually browsing the scripting forum less often than I used to... I just got tired of seeing unreadable chunks of code posted, spend time telling them to add code tags, and now we also need to tell them they're using the wrong code tags? This is all a waste of time for all of us, so I browse less as a result. I don't think this is a good path for these forums to take.
Alright, how's this - exposed the Insert Code button on the toolbar, and formatted the inline code tag. I'll see if I can clean up a few of the misused inline code tags.
Almost perfect - if inline code could be part of a sentence rather than having a line break before and after, it would even be useful
Finally at last we have inline code tags. Hopefully people don't do Things like this. Seems pretty clear that there are different buttons, though. Test var x = GameObject.Find("pants");
Now inline stuff is showing up on the same line like it should. If this doesn't help against new users picking the wrong type, make the primary code button 50% larger or otherwise more visible
Whoa... this might be useful! Code (CSharp): void Yay() { Debug.Log("Yay!"); } I never new the full form of CODE was CODESHORTCUT. EDIT: Actually, it looks like the code shortcut button doesn't work. Trying again with just CODE (typed manually) instead CODESHORTCUT (as inserted by the button): Code (csharp): void Yay() { Debug.Log("Yay!"); } EDIT2: Yep, typing CODE manually still works. Can the button be fixed to just code?
I have manually specified Courier font instead of ICODE because I thought it would look unsightly as when previewing (and as in the OP) - newline before and after it, no nice gray background and padding. Turns out it actually is the pretty inline code stuff you all use. Could you ensure CSS in preview matches what you get when posted @and-poulsen? Pretty please? While we're at that, it'd be really neat if user mentions weren't parsed within ICODE tags. For example, this happens when I try to type "at sign import" within it: [USER=618357]@IMpoRt[/USER]
However, the "Insert->Code" option is quite hidden. Prior to the introduction of this new button, new users on the scripting forum did not format their code at all. Now, new users on the scripting forum are utilizing the ICODE formatting because they desire to format their code; they simply weren't aware that there was a better method available.