Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by reptilebeats · May 16, 2012 at 05:05 PM · c#encryption

making a c# file unreadable

hi everyone i was just wandering how i stop people from being able to read my c# script after uploading it to the asset store

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AlucardJay · May 16, 2012 at 05:15 PM 1
Share

this came up a few days ago, I have no knowledge on the subject but maybe these links can help :

http://answers.unity3d.com/questions/10879/is-it-possible-to-hackdecode-asset-files.html

http://answers.unity3d.com/questions/33273/hacking-unity3d.html

http://answers.unity3d.com/questions/252901/unity-scripts-can-be-stolen.html

avatar image reptilebeats · May 16, 2012 at 05:37 PM 0
Share

to be honest i dont really $$anonymous$$d if people want to edit my script, or whatever they want to do with it, by all means make it better just make sure to give me a copy hah.

it was mainly to stop the scripts from being edited inside unity so that it couldn't cause problems to the user if they thought im going to add something to it and it causes their computer to blow up.

ive noticed when i download assets they are closed from being read or rather encrypted and that what i want, im on mac

4 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by DaveA · May 17, 2012 at 02:44 AM

There is an Obfuscator plugin in the Asset Store. It will make it harder to read. Like 'bullet proof' there is no such thing. But 'good enough' there is. So if you want to scare off the casual hacker, obfuscate it. Cuts down on the number of folks able/willing to rip you off. Never 100%. But better than nothing if you really want it.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image reptilebeats · May 18, 2012 at 04:23 AM 0
Share

i think theres actually two answers to a simple question which has now turned into a pro/con forum

avatar image
2

Answer by rutter · May 16, 2012 at 07:29 PM

Why would you even want to do that? I don't think I'd buy anything from the asset store that didn't include source code.

Comment
Add comment · Show 6 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Tasarran · May 16, 2012 at 07:53 PM 0
Share

True that!

avatar image Bunny83 · May 16, 2012 at 09:22 PM 0
Share

Well, a lot software has a closed-source-philosophy, especially the most expensive pieces ;) Unity3D is the best example. They don't offer you the source since that would prevent a lot people from buying it. If the source is available, it will be shared across the internet. The fact that it's illegal to use it without license will be ignored by most people since it's hard to tell someone used your code when it can be changed at anytime.

$$anonymous$$ost expensive assets in the store (` > $200 `) also don't include the source. If it's just a managed code assembly it's easy to get the code back, but native code plugins for example can not be decompiled that easy ;)

avatar image rutter · May 16, 2012 at 09:29 PM 0
Share

Good point. Substances might be another example where people would feel less need to be able to tinker. So I guess it comes down to: the smaller and simpler a system is, the more I can reasonably expect to be able to tinker with its inner workings? Something like that, anyway.

avatar image rutter · May 16, 2012 at 09:30 PM 0
Share

I also sometimes worry about being able to fix bugs, especially regressions introduced by new Unity versions, which is theoretically less of a concern with a product that's being reliably supported and updated.

avatar image syclamoth · May 21, 2012 at 10:32 AM 0
Share

Closed-source software is one of the greatest evils of our age. It's like selling you a motorbike, and saying "but if it breaks down, or fails for any reason, you'll have to wait for us to fix it for you 'cause you're not allowed to do anything to it yourself". Even if you have the skills to repair/improve the buggy or non-functional code you are provided with (and let's face it, everything has bugs), you simply can't do it because they don't allow you to see the source.

Show more comments
avatar image
1

Answer by Tasarran · May 16, 2012 at 05:11 PM

You cannot.

Best you can do is to make it hard to read, but that won't stop someone who is determined.

One can even extract your code from a compiled EXE file.

The code has to be readable by the computer, and if it can be run in your computer, it can be de-compiled by a savvy user.

Comment
Add comment · Show 7 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image AlucardJay · May 16, 2012 at 05:24 PM 0
Share

That's what I read the other day on http://answers.unity3d.com/questions/252901/unity-scripts-can-be-stolen.html . But my Property is not all that Intellectual to worry about it =]

avatar image Tasarran · May 16, 2012 at 05:54 PM 3
Share

Basically, its like door locks:

There isn't a lock in the world that can't be picked by someone who knows how to pick locks, given enough skill and time.

But people still lock doors, and it still keeps most people out, most of the time.

Unfortunately nothing's completely certain in this vale of $$anonymous$$rs, my friend...

avatar image Drakestar · May 16, 2012 at 07:50 PM 3
Share

$$anonymous$$y standard response to the issue: "If you're worried about somebody s$$anonymous$$ling your code, you haven't been program$$anonymous$$g long enough." With very few exceptions, the value of your work is never in actual text file.

avatar image Tasarran · May 16, 2012 at 07:52 PM 0
Share

This is one of the reasons so many people are willing to share their code; it's just not even worth trying to hide it in most cases, because if someone really wants it, they will get it anyway.

avatar image reptilebeats · May 18, 2012 at 04:21 AM 0
Share

so basically i dont need a door i need a bank vault with a nuke that blows when its opened

Show more comments
avatar image
1

Answer by by0log1c · May 16, 2012 at 08:48 PM

People have done a great job explaining why there'll always be a way to retrieve the source code, especially with the CIL. People have also point out that AssetStore's users like and want to have a copy of the source code, so those are not very good reason to lock your code away.

That being said, you may help yourself by compiling to a .exe or .dll and by using the ObfuscateAssemblyAttribute. Finally, roll your compiled program through Telerik's Eazfuscator. The whole process should keep most people off.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bunny83 · May 16, 2012 at 09:11 PM 0
Share

I read through all answers and was about to suggest building a custom assembly, but then, at the end i found your answer ;)

If he just worrys about the code being changed, compiling to a dll will be enough. If someone is interested how it's made he can simply use a .NET reflector.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

9 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

XML Encryption 1 Answer

Data encryption to transfer data over web 1 Answer

How to properly handle encryption for files? 0 Answers

How to convert texture2D to image in C# 3 Answers

java to c# 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges