Help:Formatting

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
m (added script tags)
m
Line 1: Line 1:
Here are some typical formatting elementsHit the edit button above to see what you need to type to get each effect.
+
==General Guidelines==
 +
* Please spell check your additions and check punctuation and grammar to the best of your ability.  The more people who do this the better the site will be.
 +
* Please look at some similar topics to the one you would like to write for general guides on formatting if possibleIf it isn't possible, then just perform your best and we can turn this Wiki into an excellent resource.
 +
* Discussion and comments about a page belong in the separate discussion page.  The more we can use useful features like this of MediaWiki the better our site will be.  This one keeps the main page clean and the "TODO" in a concise spot.  You can visit the discussion page for any page from the link at the top of the page.
 +
* 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).
 +
* [http://meta.wikimedia.org/wiki/Help:Category Categories] will help this project out in the long run. Please try to use them logically and look at existing pages for use examples in our project's context.
  
The Contents box you see below is generated automatically and responds to heading lines you add to the text:
+
==Creating Script Pages==
  
= Level 1 heading =
+
Page layouts within the Unify Community Wiki are important. By following these guidelines you help ensure wiki pages are clear and precise.
  
Don't use level one headings if you can help it. Use level 2 headings for anything which needs a clear dividing line, and level 3 for most other things.
+
* Author = This is you the person writing the page, please include any credits to people here also.
 +
* Description = A general description of what the script/code can do.
 +
* Usage = How to use the script/code (please give clear precise instructions).
 +
* Code = Use the code format below when writing you codes.
  
== Level 2 heading ==
+
[[Help:Contents| More editing help.]]
 
+
=== Level 3 heading ===
+
 
+
==== Level 4 heading ====
+
 
+
===== Level 5 heading =====
+
 
+
====== Level 6 heading ======
+
 
+
Use multiple single quotes for ''italics'' and '''bold''' instead of the equivalent HTML tags.
+
 
+
If you want to leave a paragraph break, use two carriage returns.
+
If you only use one, it'll automatically join the second sentence onto the first.
+
 
+
----
+
 
+
You can add a horizontal divider, like the one above,  by typing four dashes.
+
 
+
In talk pages, you can type <nowiki>--~~~~</nowiki> (two dashes and four tildes) to sign your comments with your name and a datestamp.  This makes it easier to tell who is writing.  The signature looks like this: --[[User:NCarter|NCarter]] 23:11, 28 April 2006 (GMT)
+
 
+
== Lists ==
+
 
+
You can do lists by prefixing each item with asterisks:
+
 
+
*One
+
*Two
+
*Three
+
 
+
Numbered lists are done in the same way, but with hash signs:
+
 
+
#One
+
#Two
+
#Three
+
 
+
You can nest lists by adding extra symbols, and you can even mix numbered and non-numbered lists:
+
 
+
*One
+
*Two
+
**One
+
**Two
+
**#One
+
**#Two
+
**Three
+
*Three
+
 
+
== Internal links ==
+
 
+
Don't use complete URLs for internal links. Just use the bit which appears after 'index.php?title=' in the URL.  The following are examples of how to make various kinds of links:
+
 
+
[[Main Page]] - no need to use underscores for spaces... this is handled automatically.
+
 
+
[[Main Page|Link with a different title]] - use a bar | character to separate the link from the title.
+
 
+
[[:Category:MonoBehaviour]] - an unformatted link to a category.  For links to other namespaces, it's necessary to use a leading colon to cancel out the other colon between the namespace and the page name.
+
 
+
[[:Category:MonoBehaviour|A link to a category with a different title]] - Again, use a bar character as a separator.
+
 
+
== External links ==
+
 
+
[http://unity3d.com/ Unity] - external link.  Note that the link title is separated from the URL by a space.  You can't use a bar character for this purpose.
+
 
+
==Adding Scripts==
+
 
+
When adding scripts to your page please ensure you use the following script tags. This will help keep the wiki clean.
+
  
 +
==Script Tags==
 
=====Csharp Script Tag=====
 
=====Csharp Script Tag=====
  

Revision as of 09:02, 11 October 2011

Contents

General Guidelines

  • Please spell check your additions and check punctuation and grammar to the best of your ability. The more people who do this the better the site will be.
  • Please look at some similar topics to the one you would like to write for general guides on formatting if possible. If it isn't possible, then just perform your best and we can turn this Wiki into an excellent resource.
  • Discussion and comments about a page belong in the separate discussion page. The more we can use useful features like this of MediaWiki the better our site will be. This one keeps the main page clean and the "TODO" in a concise spot. You can visit the discussion page for any page from the link at the top of the page.
  • 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).
  • Categories will help this project out in the long run. Please try to use them logically and look at existing pages for use examples in our project's context.

Creating Script Pages

Page layouts within the Unify Community Wiki are important. By following these guidelines you help ensure wiki pages are clear and precise.

  • Author = This is you the person writing the page, please include any credits to people here also.
  • Description = A general description of what the script/code can do.
  • Usage = How to use the script/code (please give clear precise instructions).
  • Code = Use the code format below when writing you codes.

More editing help.

Script Tags

Csharp Script Tag
<csharp>  Insert script text here </csharp> 

The csharp tag will produce the following example.

<csharp> public class TestEvent : IEvent {

   public TestEvent()
   {
   }
   string IEvent.GetName()
   {
       return this.GetType().ToString();
   }
   object IEvent.GetData()
   {
       return "TestEvent Data goes here!";
   }

} </csharp>

Java/Unity Script Tag
<javascript>  Insert script text here </javascript> 

The javascript tag will produce the following example.

<javascript>// CoUpdate script skeleton.

  1. pragma strict

function Start() {

   StartCoroutine("CoStart");

}

function CoStart() : IEnumerator {

   while (true)
       yield CoUpdate();

}

function CoUpdate() : IEnumerator {

   // Place your update code here.

}</javascript>

Boo Script Tag
<Boo>  Insert script text here </Boo> 

The Boo script tag will produce the following example.

<boo>class MessageText (Message):

   Text:
       get:
           return _text
   _text as string
   def constructor (text):
       _text = text
       # send the message
       super()</boo>
Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox