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. Voting for the Unity Awards are OPEN! We’re looking to celebrate creators across games, industry, film, and many more categories. Cast your vote now for all categories
    Dismiss Notice
  3. Dismiss Notice

Private API creation

Discussion in 'Scripting' started by StatPhantom, Dec 4, 2018.

  1. StatPhantom

    StatPhantom

    Joined:
    Oct 15, 2018
    Posts:
    6
    Hello all, I am wishing to create an Unity C# API for a University project however because this API is getting interest from industries I am wishing to make it private / closed source but am unsure how to go about doing this, maybe sections of compiled code that an open API can interact with? I'm just spit-balling at the moment, any suggesting on where to start looking and what unity has available to help this work?

    Thank You.
     
  2. tonemcbride

    tonemcbride

    Joined:
    Sep 7, 2010
    Posts:
    1,077
    It's not really possible to do that with C# - even if you made it a DLL it's still fairly trivial to decompile it back into C#. You could obfuscate the code first which would help a little but not much. The best way to do a closed system is to make it online only (where the user just requests data from a black box) but that only works for certain systems.
     
  3. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    9,900
    In the industry with this many clever people who can decompile anything, it's not the source code is the main problem when you're writing proprietary software. Obviously you will create a DLL and ship that, but you should also pay attention to the legal texts accompany your software.
    It is futile to try to make your code immune to decompilation. The people who want to steal it, they will, the people who want to use it legally will pay you. Simple as that. Make it awesome enough to worth the money.

    Unity does not support extra source code protection. You get DLLs and that's it. Which is next to nothing.
     
    Joe-Censored and SparrowGS like this.
  4. Suddoha

    Suddoha

    Joined:
    Nov 9, 2013
    Posts:
    2,824
    You should also check whether or not you're the one that has to worry about it at all.

    It's pretty common that there's some agreement when you get enrolled, in which the university claims the copyrights in exchange for the "working places", hardware, software, technical and educational support etc.

    Of course this may vary from country to country / university to university.
     
  5. StatPhantom

    StatPhantom

    Joined:
    Oct 15, 2018
    Posts:
    6
    Thanks for the replies, It's something I was asked by the University to look into, not just for this one project but also for educational purposes, I will look into obfuscating c# and .dll's because even if it can be decompiled easier they don't know the original variable names etc which does at least make it harder