Class Utility
어셈블리: Assembly-CSharp.dll
Syntax
[MoonSharpUserData]
public class Utility
함수
EncodeURL(string, bool)
선언
public static string EncodeURL(string url, bool trim = false)
매개 변수(인자)
타입 |
이름 |
설명 |
string |
url |
|
bool |
trim |
|
반환
GetLuaGlobal(string)
선언
public static object GetLuaGlobal(string key)
매개 변수(인자)
반환
GetLuaPairs(object)
선언
public static DynValue GetLuaPairs(object obj)
매개 변수(인자)
반환
타입 |
설명 |
MoonSharp.Interpreter.DynValue |
|
GetParentSize(Control)
선언
public static Vector2 GetParentSize(Control parent)
매개 변수(인자)
반환
타입 |
설명 |
UnityEngine.Vector2 |
|
GetSprite(string)
선언
public static Sprite GetSprite(string imagePath)
매개 변수(인자)
타입 |
이름 |
설명 |
string |
imagePath |
|
반환
JSONParse(string)
선언
public Table JSONParse(string json)
매개 변수(인자)
반환
타입 |
설명 |
MoonSharp.Interpreter.Table |
|
JSONParseFromFile(string)
선언
public Table JSONParseFromFile(string filePath)
매개 변수(인자)
타입 |
이름 |
설명 |
string |
filePath |
JSON 파일의 경로
|
반환
타입 |
설명 |
MoonSharp.Interpreter.Table |
|
JSONSerialize(Table)
선언
public string JSONSerialize(Table t)
매개 변수(인자)
타입 |
이름 |
설명 |
MoonSharp.Interpreter.Table |
t |
|
반환
MakeControl(TGameLayoutPage, TGameLayoutControl, Control, TGameEventPage)
선언
public static Control MakeControl(TGameLayoutPage _page, TGameLayoutControl controlData, Control parent = null, TGameEventPage _eventPage = null)
매개 변수(인자)
타입 |
이름 |
설명 |
TGameLayoutPage |
_page |
|
network.TGameLayoutControl |
controlData |
|
Control |
parent |
|
network.TGameEventPage |
_eventPage |
|
반환
ObjectParse(object)
userdata
타입의 객체를 테이블로 변환합니다.
선언
public static Table ObjectParse(object obj)
매개 변수(인자)
타입 |
이름 |
설명 |
object |
obj |
테이블로 변환할 객체
|
반환
타입 |
설명 |
MoonSharp.Interpreter.Table |
|
ObjectSerialize(object, int)
선언
public static string ObjectSerialize(object obj, int formatting = 0)
매개 변수(인자)
타입 |
이름 |
설명 |
object |
obj |
직렬화할 객체
|
int |
formatting |
포맷팅(0: 일반, 1: 줄띄움)
|
반환
TranslateText(string, Closure, string)
선언
public void TranslateText(string text, Closure callback, string sourceLanguage = null)
매개 변수(인자)
타입 |
이름 |
설명 |
string |
text |
번역할 텍스트
|
MoonSharp.Interpreter.Closure |
callback |
번역후 실행될 콜백. 번역된 언어가 파라미터로 실행됩니다.
|
string |
sourceLanguage |
번역할 텍스트의 언어 ISO Code 규칙을 가집니다. 기본값은 게임의 언어입니다.
예)KO, EN 등
|