Help:Formatting
From Unify Community Wiki
Revision as of 00:46, 19 October 2020 by Isaiah Kelly (Talk | contribs)
General Guidelines
- English text only.
- Please check for spelling, punctuation and grammatical errors in your work before submitting it.
- Do not add any author or revision information to your page. This is all automatically handled by page history.
- Discussions and comments about a page belong in the accompanying discussion page. You can visit or create the discussion section of any page by clicking on the "Discussion" tab at the top left corner.
- Place relevant category tags at the bottom of the page. Please try to use them logically and look at existing pages for use examples.
Code
- Small snippets of code, like for example
int health = 100
, can be denoted using the simple<code></code>
tag.
- Don't use tabs in code examples. They are hard to type when editing in a browser and lines containing tabs have weird problems when combined with links generated by the syntax highlighter. If you have a script file with tabs and don't want to change that, you can copy the contents and then run the following line in a command shell before pasting it into the wiki: pbpaste | expand -t 4 | pbcopy (This example assumes you have set your editor to have a tab stop every 4 characters).
- For full blocks of code and proper syntax highlighting use
<syntaxhighlight lang="csharp"></syntaxhighlight>
instead. Which will produce the following:
using UnityEngine; public class MyScript : MonoBehaviour { public int value = 943; // Update is called once per frame. private void Update() { if (value > 0) { value--; } } }