Search Unity

Question How to make Scripts Un-readable and Un-editable?

Discussion in 'Editor & General Support' started by DoAugMenRo, Jan 27, 2022.

  1. DoAugMenRo

    DoAugMenRo

    Joined:
    Sep 17, 2019
    Posts:
    18
    Hello,

    I have seen some third party tools, where I was not able to open or modify some of the provided scripts. I was only able to fill in the public variables. This is something I would like to do in my current project as well. I want some parts to be not readable or editable. How can I achieve that? I was not able to hit the right search terms so far and appreciate any help.

    Thank you very much and best regards!
     
  2. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,115
    you could compile the scripts in a dll
     
  3. DoAugMenRo

    DoAugMenRo

    Joined:
    Sep 17, 2019
    Posts:
    18
    Thank you, that would definitely solve my problem.

    The drawbacks that come to mind are the additional overhead of creating a library for every required platform, and the extra steps if the scripts are updated. If there different solutions i would like to learn about them as well.
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,697
    Before you waste too much of your life on this venture, and it WILL impose a serious penalty on ALL your future development to be working in a DLL, let me offer you this blurb:

    If you're concerned about the user 'hacking your save files,' or 'cheating in your game,' just don't be. There's nothing you can do about it. Nothing is secure, it is not your computer, it is the user's computer. If it must be secure, store it on your own server and have the user connect to download it.

    Anything else is a waste of your time and the only person you're going to inconvenience is yourself when you're debugging the game and you have savegame errors. Work on your game instead.

    Remember, it only takes one 12-year-old in Finland to write a script to read/write your game files and everybody else can now use that script. Read about Cheat Engine to see more ways you cannot possibly control this.

    The good news is that most likely nobody will care enough about your game to bother, so you're safe.

    And as far as stealing your code or assets, don't bother trying to stop that either:

    Nobody cares about your project because code has no value.

    Proof: you can already download gazillions of open-sourced games with amazing art and code and features and gameplay.

    Step 1: Take one, any one, repackage it and try and make some money.

    Step 2: You'll soon find what I mean: code and assets has ZERO value.
     
  5. DoAugMenRo

    DoAugMenRo

    Joined:
    Sep 17, 2019
    Posts:
    18
    I am actually less concerned about people "stealing". Mainly I want to hide complex stuff and limit the amount of options of the tool. I want to prevent the users to get overwhelmed, and limit their possibilities of causing changes to a working system, especially because most of the users will be inexperienced in unity and I want to spend as little time as possible on support.
    Thank you very much for the elaborate answer! Reading it, it still seem to me that it wouldn't be worth the effort.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    So you are creating an Editor tool that other developers will use?
     
  7. DoAugMenRo

    DoAugMenRo

    Joined:
    Sep 17, 2019
    Posts:
    18
    @JeffDUnity3D sorry for the late reply. Its not supposed to be an editor tool. I am providing a tool that enables object detection and positioning in 3D space for Augmented reality Apps. The students that will be using it have no experience in the area at all and might get overwhelmed just by augmented reality. Time will be of essence here and thus i want to remove the possibility of modifying the code. For them it should be as simple as using the output transform my algorithm provides.
    Thank You!
     
  8. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,115
    did the editor even works in VR? these students positions objects in VR inside the editor?

    probably best if you explain better what you are trying to achieve