Search Unity

No Object destroy for C# anymore

Discussion in 'Editor & General Support' started by Valvados, Aug 12, 2014.

  1. Valvados

    Valvados

    Joined:
    Jan 27, 2013
    Posts:
    63
    I'm having a lot of trouble with the new website and scripting API tons of stuff missing from it that was in the older version with the search bar on the left instead of the top right corner

    Specifically



    At 2:48

    That old API I used to use seemed to find everything in existance the new one is missing everything I search for very difficult to learn C# with all of this stuff missing :(


    Try actually searching object destroy while in C# it says its not there until you change it to java script.
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775

    Attached Files:

  3. Valvados

    Valvados

    Joined:
    Jan 27, 2013
    Posts:
    63
    Uh.....

    Wrong... Actually click it and you will see there is no C# at all.

    "
    no example available in C#"
     
  4. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I don't think there's anything missing in the docs compared to the old version; Object.Destroy never had a C# example anyway. Sure that's a bit of an oversight, but does it actually matter much? The JS example has stuff like:

    Code (csharp):
    1. Destroy (gameObject);
    Where the C# version would be:

    Code (csharp):
    1. Destroy (gameObject);
    So there shouldn't be any difficulty "translating" that.

    --Eric
     
  5. Valvados

    Valvados

    Joined:
    Jan 27, 2013
    Posts:
    63
    the fact that it WAS there in the video and isn't there now is confusing as hell for people who are just learning their first language. As far as I know having descriptions on your library is hugely important when learning to build your own stuff.

    Seems really simple to add it I don't see the argument against it at all in fact it sounds pretty moronic to leave an engine incomplete when it's a simple copy paste like you mention above.
     
  6. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    I went back further, to the 3.5 docs, and indeed it's there. (Although it's actually wrong in one place; it has the line "Destroy();" which is a syntax error. Maybe they removed it because of that and forgot to replace it with a working version?) You can run across problems trying to use a Unity 3 tutorial with Unity 4 anyway, so that tutorial was out of date. That's something you need to check for if possible.

    In any case, I don't think there's "tons of stuff missing". The documentation formatting has been updated more than once since the Unity 3 days, which may be throwing you off.

    --Eric