Search Unity

Examples but no Results

Discussion in 'Documentation' started by eshan-mathur, Oct 17, 2014.

  1. eshan-mathur

    eshan-mathur

    Joined:
    Nov 22, 2011
    Posts:
    118
    Numerous times across documentation, I've seen usage examples for a function but often there's no mention of the expected result.

    i.e. http://docs.unity3d.com/ScriptReference/Mathf.CeilToInt.html

    On that page, there are examples of how to call CeilToInt, but never an example of what it returns for those calls!

    Please fix :)
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Switch to JS; I guess the automatic C# code converter doesn't include comments for some reason.

    --Eric
     
  3. eshan-mathur

    eshan-mathur

    Joined:
    Nov 22, 2011
    Posts:
    118
    So.. I suppose I'm really asking for it to include comments then :)
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    It really should.

    --Eric
     
  5. Rasmus Selsmark

    Rasmus Selsmark

    Joined:
    Mar 13, 2013
    Posts:
    120
    Correct, as @Eric5h5 writes, our UnityScript-to-C# converter used for auto-converting the code to C# in the documentation unfortunately doesn't handle comments. For 5.x documentation we're using a new C#-to-UnityScript converter, which will convert comments as well, however we still need to manually convert all the examples into C#.

    So eventually this will happen, but for now you have to look at the UnityScript version of the sample code.

    Best regards, Rasmus
     
    eshan-mathur likes this.