C# 클래스 LeopotamGroup.Scripting.ScriptVM

Script engine VM. Internal class.
파일 보기 프로젝트 열기: Leopotam/LeopotamGroupLibraryUnity 1 사용 예제들

공개 메소드들

메소드 설명
CallFunction ( string funcName, ScriptVar &result, ScriptVar param1 = null, ScriptVar param2 = null, ScriptVar param3 = null, ScriptVar param4 = null ) : string

Call script function.

GetParamByID ( int id ) : ScriptVar

Get specified parameter that was passed from script to current host function.

GetParamsCount ( ) : int

Get parameters count passed from script to current host function.

IsFunctionExists ( string funcName ) : bool

Is script function exists.

Load ( string source ) : string

Load script source code. Old Vm state will be reset.

RegisterHostFunction ( string funcName, HostFunction cb ) : void

Register host function to VM (publish to calling from script side).

ScriptVM ( ) : LeopotamGroup.Scripting.Internal

Default initialization.

SetRuntimeError ( string msg ) : void

Raise runtime error at VM.

UnregisterAllHostFunctions ( ) : void

Unregister all host functions from VM (unpublish from script side).

메소드 상세

CallFunction() 공개 메소드

Call script function.
public CallFunction ( string funcName, ScriptVar &result, ScriptVar param1 = null, ScriptVar param2 = null, ScriptVar param3 = null, ScriptVar param4 = null ) : string
funcName string Function name.
result ScriptVar Result of function execution.
param1 ScriptVar Optional parameter to function.
param2 ScriptVar Optional parameter to function.
param3 ScriptVar Optional parameter to function.
param4 ScriptVar Optional parameter to function.
리턴 string

GetParamByID() 공개 메소드

Get specified parameter that was passed from script to current host function.
public GetParamByID ( int id ) : ScriptVar
id int Number of parameter.
리턴 ScriptVar

GetParamsCount() 공개 메소드

Get parameters count passed from script to current host function.
public GetParamsCount ( ) : int
리턴 int

IsFunctionExists() 공개 메소드

Is script function exists.
public IsFunctionExists ( string funcName ) : bool
funcName string Function name.
리턴 bool

Load() 공개 메소드

Load script source code. Old Vm state will be reset.
public Load ( string source ) : string
source string Source.
리턴 string

RegisterHostFunction() 공개 메소드

Register host function to VM (publish to calling from script side).
public RegisterHostFunction ( string funcName, HostFunction cb ) : void
funcName string Func name.
cb HostFunction Cb.
리턴 void

ScriptVM() 공개 메소드

Default initialization.
public ScriptVM ( ) : LeopotamGroup.Scripting.Internal
리턴 LeopotamGroup.Scripting.Internal

SetRuntimeError() 공개 메소드

Raise runtime error at VM.
public SetRuntimeError ( string msg ) : void
msg string Message.
리턴 void

UnregisterAllHostFunctions() 공개 메소드

Unregister all host functions from VM (unpublish from script side).
public UnregisterAllHostFunctions ( ) : void
리턴 void