Search Unity

Hacked my own Webplayer!

Discussion in 'Scripting' started by Agrios, Oct 3, 2011.

  1. Agrios

    Agrios

    Joined:
    Aug 21, 2009
    Posts:
    50
    So finally I decided to verify what people say and opened my game prototype with Reflector
    to see... EVERYTHING including Debug log statement :eek:

    Is it really like that, or only free Unity version does that?
    Can I at least remove my Debug notes and log messages from compiled version?

    Also, I noticed that some scripts, server specific are included in the client side build.
    I am quite certain, none of them or any of variables is used in client, and yet they are part
    of client build.
     
  2. justinlloyd

    justinlloyd

    Joined:
    Aug 5, 2010
    Posts:
    1,680
    This topic has been answered multiple times on the forums and Answers, but in essence, yeah, that's pretty much all there is too it. I can take any non-obfuscated Unity project and read through what the programmer did, pull out textures and models and sound effects.
     
  3. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    1,056
    Do editor scripts get included in there?
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    no, they exist only in the editor, nowhere else
     
  5. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,767
    Thanks dreamora
     
  6. Agrios

    Agrios

    Joined:
    Aug 21, 2009
    Posts:
    50
    I just need some time to let it sink...
    Probably Debug.Logs in WebPlayer were the most shocking part to me... aren't we suppose strive for smaller builds here?
    Is there a software to prepare source C# for compilation by removing Debug and comments from code?
     
  7. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    you strive for what you want. If you tell the webplayer to output a debug log it will do so into the webplayer log file and thats for a reason: you want to be able to get such informations in case users have problems, don't you? Because blind guess debugging will never wokr out :)
     
  8. Agrios

    Agrios

    Joined:
    Aug 21, 2009
    Posts:
    50
    And why would I want to do this if I have sources ?
    Seriously, why would I want all my source TODOs and NOTEs and comments and Debug.Logs be embedded in compiled package and available for everybody to read?
     
    Last edited: Oct 4, 2011
  9. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Comments aren't included. You want Debug.Log to work for the reasons dreamora said. Debug.Log isn't for notes and comments; if you're using it for that, you shouldn't be.

    --Eric
     
  10. Agrios

    Agrios

    Joined:
    Aug 21, 2009
    Posts:
    50
    I've been using Debug to trace variables and program flow, but will have to find other way of doing it.
    Also will have to develop some scrambling of strings holding important data.