言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

ObjectNames.NicifyVariableName

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static function NicifyVariableName(name: string): string;
public static string NicifyVariableName(string name);
public static def NicifyVariableName(name as string) as string

Description

Editor上で表示を行うための変数名を作成します

大文字のところにはスペースを挿入したり、変数名で使われる先頭の _km_ を削除して見やすくします。

	// prints "My Variable"
	print (ObjectNames.NicifyVariableName ("MyVariable"));
	// prints "The Other Variable"
	print (ObjectNames.NicifyVariableName ("m_TheOtherVariable"));
	// prints "Some Constant"
	print (ObjectNames.NicifyVariableName ("kSomeConstant"));