Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Please!!! Reverted made my code gray so now I cannot use it? :((((

Discussion in 'Scripting' started by Findo, May 17, 2014.

  1. Findo

    Findo

    Joined:
    Mar 11, 2014
    Posts:
    368
    I tryed to revert some of my code back to an old version, and, expecting to see options as I clicked revert, all it did was make some of my code the color you get when you do this


    How do I make it.. um.. un-gray?
     
    Last edited: May 17, 2014
  2. Findo

    Findo

    Joined:
    Mar 11, 2014
    Posts:
    368
    I can still code, but I just hate dat gray color :(
     
  3. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,377
    What editor are you using?

    What did you revert with? Is this a version control system you reverted with?

    Does your version control, or IDE, mean something when it's greyed out?

    We do not have enough information to go on with your description.
     
  4. Findo

    Findo

    Joined:
    Mar 11, 2014
    Posts:
    368
    1. Unity?
    2. MonoBehaviour
    3. It means something, yet I despise not having colors.
     
  5. Findo

    Findo

    Joined:
    Mar 11, 2014
    Posts:
    368
    uh heres what it says when I click revert: $sd.PNG
     
  6. Findo

    Findo

    Joined:
    Mar 11, 2014
    Posts:
    368
    Bump D:
     
  7. JamesLeeNZ

    JamesLeeNZ

    Joined:
    Nov 15, 2011
    Posts:
    5,616
    sounds like you have one of these somewhere...

    /*
     
  8. Findo

    Findo

    Joined:
    Mar 11, 2014
    Posts:
    368
    No I do not, because the code works, but cause I clicked revert... its.... gray
     
  9. FufuzStudios

    FufuzStudios

    Joined:
    Jan 17, 2014
    Posts:
    4
    The code is probably inside a precompiler directive and this directive is not defined/inactive. I.e. the could could be inside UNITY_WEBPLAYER while the target is set to Windows, for example:

    #if UNITY_WEBPLAYER
    ... your code
    #endif

    See above in your code if you don't have one of those.
     
  10. bigmisterb

    bigmisterb

    Joined:
    Nov 6, 2010
    Posts:
    4,221
    Please post the code. No one can help you until you do.
     
  11. Findo

    Findo

    Joined:
    Mar 11, 2014
    Posts:
    368
    bigmisterb just wants my scripts


    IF I POST MY CODE, IT WILL BE BLACK, THIS FORUM DOES NOT HAVE A COLOR DETECTOR.

    Read my thread before you answer bigmisterb.
     
  12. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,500
    Why would he want your scripts? He's trying to help. If people can't see what you've got then how can they see what the problem is and fix it? Also, they probably aren't asking because they want to see the colour. They want to help you find the error that's causing it.

    Look for comments, version control markup or pre-processor directives in your code, as others have suggested. If there's none of that then check that your IDE doesn't think it's looking at a standard text file or something, and that syntax hilighting is on and is set to the right language and theme.
     
    Last edited: May 23, 2014
  13. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,935
    take screenshot..
     
  14. chrisall76

    chrisall76

    Joined:
    May 19, 2012
    Posts:
    667
    No, he wants to check your code to see if it has any problem that could be causing this :l
     
  15. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    @Findo, the community is trying to help you, do not be rude to them. They have requested you post your code so that they may help you.

    No, he is much more advanced than that. Your script is broken, and therefore what you say is illogical. Assuming most of your code is grey it could be that you have /* placed by accident somewhere. This is the start of a large comment block:

    /*

    lots of stuff commented

    some more here

    */
     
  16. lorenalexm

    lorenalexm

    Joined:
    Dec 14, 2012
    Posts:
    307
    So you're taking issue to the default color of comments within your IDE being grey? As the script is working without flaw as your say, this is the only thing I can think of with what you have already stated. You can simply go into your IDE (MonoDevelop, Visual Studio, Sublime, ect) and change the default color of comments to something more your liking.