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’.


class 몬스터class

int 체력int

  1. 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.


int 가로 = 10;

int 세로 = 20;

int 넓이 = 가로 * 세로;

  • Original

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

  1. 직관적이다.

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

가독성이 떨어집니다.

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

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

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

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

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.

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).

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 : Unity Asset Store - The Best Assets for Game Making
  2. Unity Asset Store - The Best Assets for Game Making