Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 ggavi2000 · Jul 25, 2017 at 01:44 PM · c#variablefunction

Can I use 'variable name & function name' in a foreign language? (유니티는 '한글 변수명 & 한글 함수명' 이름 지정이 가능한가요?)


  • It used Google Translator.

Here is why I want to use 'variable name && function name' in a foreign language.


1) Intuitive.

For example, if you write [어제 평균] in English, you should write "YesterdayAverage".

Readability is poor. So I would like to mix 'Korean + English'.


(ex)

class 몬스터class

int 체력int



2) Code defense (a foreigner steals my code)

Unity is vulnerable to decompilation. So, when you develop in Korea, foreigners will decompile it.

Foreigners take my code and sell it in their country.

In order to prevent this code theft, I want to set it in Korean so that I can not recognize the variable.


(ex)

int 가로 = 10;

int 세로 = 20;

int 넓이 = 가로 * 세로;




  • Original

내가 외국어로 '변수명 && 함수명'을 사용하려는 이유는 다음과 같습니다.

1) 직관적이다.

예를들어, [어제평균]을 영어로 적으면 "AverageYesterday"라고 써야 합니다.

가독성이 떨어집니다.


2) 코드 방어 (외국인이 나의 코드를 도둑질한다.)

유니티는 디컴파일에 취약합니다. 그래서, 한국에서 개발하면, 외국 사람이 그것을 디컴파일합니다.

외국인들은 나의 코드를 가져가서, 그것을 그들의 국가에서 판매해버립니다.

이러한 코드 도둑질을 막기 위해, 나는 변수를 알아볼 수 없도록 한국어로 설정하고 싶습니다.

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 ShadyProductions · Jul 25, 2017 at 02:26 PM 0
Share

"Readability is poor" is what you use as argument, as if people can read chinese. lol. I would refrain from using anyother language in program$$anonymous$$g other than english as most program$$anonymous$$g languages are actually based of english words.

avatar image ggavi2000 ShadyProductions · Jul 25, 2017 at 02:43 PM 0
Share

I try to develop by myself. However, if I collaborate, I will develop in English.

3 Replies

· Add your reply
  • Sort: 
avatar image
3

Answer by tanoshimi · Jul 25, 2017 at 02:41 PM

You can name your variables however you like, but you should do so to increase understandability, not decrease it!

I can't speak Korean, but I can decompile your code and it would be trivial to work out what each variable did from its usage - what you chose to name that variable is irrelevant to me.

Comment
Add comment · Show 3 · 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 ggavi2000 · Jul 25, 2017 at 02:58 PM 0
Share

Thank you for your reply ^_^ If so, I want to know how to defeat decompilation.

avatar image Bunny83 · Jul 25, 2017 at 04:36 PM 0
Share

I agree on your first point, i disagree with your second ^^. It's a quite heavy task to deobfuscate code like that. Have a look at Robocraft's main assembly. It's extremely hard to actually distinguish type names from variables or methods. I've seen a vb.net virus (got it for free via email -.-) that actually used some chinese or korean letters. Hell you couldn't even tell them apart as they look all the same :D

You would need to pre-process the code and give everything a simpler name. Also reflection / Cecil can tell you what is a class / method / variable / property ... so you could at least choose a different na$$anonymous$$g style.

When you have a large code base it's a pain to actually reconstruct the classes with meaningful names. I've seen some games made with Untiy and they only use monobehaviour "wrapper". So there's a wrapper monobehaviour with a more or less meaningful name and all it does in awake is to create an instance of a normal class which has completely been obfuscated. Certain events might be forwarded by the wrapper but it makes it very hard to figure out what is doing what.

avatar image ggavi2000 Bunny83 · Jul 26, 2017 at 06:31 AM 0
Share

Thank you for your reply :)

I wonder if I understood your sentence.

(PS : I used Google Translator, so the sentence might be strange.)


1) It's a quite heavy task to deobfuscate code like that.

→ Does encrypting $$anonymous$$orean code mean making the system heavy?

→ Google translator does not recognize the word 'deobfuscate'. However, I am guessing it is related to encryption.


2) Also reflection / Cecil can tell you what is a class / method / variable / property ... so you could at least choose a different na$$anonymous$$g style.

→ If I develop alone, I will create a separate rule to distinguish between 'class / method / variable / property'.

→ example : 몬스터class ($$anonymous$$onster class), int 체력int (int i_HP) ...

→ However, if you are developing in a particular group, I must follow their rules. (I will probably use English at that time.)


3) I've seen some games made with Untiy and they only use monobehaviour "wrapper"

→ From the $$anonymous$$orean search engine I searched monobehaviour "wrapper" but did not see any details. But I'm guessing that this is an act of encrypting existing code.

avatar image
1

Answer by EdwinChua · Jul 25, 2017 at 02:37 PM

I'm not sure that what you're proposing would be useful. A good IDE (eg. Visual Studio) would be able to trace the dependencies and refactor them into readable form in a couple of keystrokes.

Example: Pressing F2 in VS when a variable is selected will allow you to rename all uses of this variable, same for classes etc.

Secondly, assuming that you manage to mask your variable names, all your code will still be in English, meaning the logic can be easily understood.

But if you really did want to use another language, you might be able to. See this link where someone did it with Chinese (with problems). https://developercommunity.visualstudio.com/content/problem/75502/intellisense-can-not-list-the-variables-and-functi.html

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 ggavi2000 · Jul 25, 2017 at 02:51 PM 1
Share

Thank you for your reply. Visual Studio and Eclipse support $$anonymous$$orean variable names. But Unity was not sure if it would support it.

Other communities recommended code encryption to me. But I still have not enough studying. I'm learning more.

[P.S] This sentence uses a Google Translator, so it may be strange.

avatar image
1

Answer by itsharshdeep · Jul 25, 2017 at 03:21 PM

Hi @ggavi2000 ,

I know my answer is not suited with the title, but the user was asking to save the code from decryption by using foreign language

Sorry in case I get the question wrong, But I also just wanna add my opinion

Thanks lot for such a post, I also wanna ask this question a long time ago, but that for just fun part.

Now coming back to your question, I wanna say that do need any system/framework/library which just encrypts the code, so that if someone decompiles then the vars, methods name shouldn't be visible

So I would suggest some of the followings assets available which may fulfill your requirements:

  1. Obfuscator : https://www.assetstore.unity3d.com/en/#!/content/48919

  2. https://www.assetstore.unity3d.com/en/#!/content/44931

Thanks

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 ggavi2000 · Jul 25, 2017 at 03:30 PM 0
Share

Thank you for your kindly reply. I will discuss this with my $$anonymous$$cher. Based on the keywords you provided, I will search more.

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

361 People are following this question.

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

Related Questions

How to correctly send a variable to another function? 1 Answer

script with individual function for each gameObject or public script variable to solve inventory system problem 1 Answer

Find variable in another script using a string 1 Answer

Lower player's health from separate script. 2 Answers

Getting a Non Static Variable From a Different C# Script 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