C# Class CSharpInterpreter, CSharp-Interpreter-for-Unity-3D

Implements a hosting environment for the C# Interpreter as a Component that can be attached to a GameObject in Unity 3D.
Inheritance: MonoBehaviour, CSI.IConsole
Afficher le fichier Open project: keyword/CSharp-Interpreter-for-Unity-3D Class Usage Examples

Méthodes publiques

Свойство Type Description
bottomMargin float
includeAsset UnityEngine.Object
includeFile string
leftMargin float
maxHistorySize int
maxOutputLineCount int
maxOutputLineWidth int
maxOutputSize int
queuedAsset UnityEngine.Object
rightMargin float
showInteractiveGUI bool
showOutputAsEditorSelection bool
showOutputText bool
showTooltipText bool
splitterFraction float
toolboxWidth int
topMargin float

Méthodes publiques

Méthode Description
AddGlobal ( string name, object value ) : object

Adds the specified global variable to the interpreter environment.

CSI ( CSI callback ) : void
ClearHistory ( ) : void
ClearHistory ( string &history ) : void
ClearOutput ( ) : void
ClearOutput ( string &outputText ) : void
ExecuteCode ( string inputText ) : bool

Execute the specified code in the interpreter environment.

ExecuteFile ( string inputFilename ) : bool

Execute the specified file in the interpreter environment.

GetHistory ( ) : string[]
GetLastExecuteResult ( ) : object
GetOutput ( ) : string
HasGlobal ( string name ) : bool
Invoke ( Action action ) : void

Implements a helper method that can be used to execute a statement and hide the result from the interpreter output windows.

IsEditorAvailable ( ) : bool
RemoveGlobal ( string name ) : bool
Select ( GameObject gameObject ) : bool
Select ( IEnumerable unityObjects ) : bool
Select ( Transform transform ) : bool
Select ( UnityEngine unityObject ) : bool
Select ( object obj ) : bool

Private Methods

Méthode Description
Awake ( ) : void
CSI ( ) : int
CSI ( string s ) : string
EnforceParameterLimits ( ) : void
ForceWarning ( string message ) : void
ForceWarning ( string message, UnityEngine context ) : void
GetAssetText ( object asset, string &assetName ) : string
GetDefaultIncludeFilename ( ) : string
GetFullPathOfAssembly ( Assembly assembly ) : string
OnDrawGUI ( ) : void

Called when the GUI needs to be drawn.

OnExecuteInput ( ) : void

Called when the input text need to be executed (e.g., when Enter is pressed).

OnGUI ( ) : void

Draws the GUI and execute its interaction logic; called by Unity on a frequent basis.

OnGetUnknownItem ( object key ) : object
OnMetaRequest ( ) : bool

Called when metadata should be displayed (e.g., when Alt+F1 is pressed).

OnNavigateHistory ( bool useTrueForOlderOrFalseForNewerOrNullForUndo ) : void

Called when the history needs ot be navigated (e.g., when the up-arrow, down-arrow or escape key is pressed).

PromptForInput ( string prompt ) : void
Reinitialize ( ) : bool

Performs initialization of this instance, which can be called at startup or in play mode when the Unity Editor rebuilds scripts.

Reset ( ) : void
ResolveFilename ( string filename ) : string
Select ( string selectionPropertyName, object selectionPropertyValue ) : bool
SetUnityEditorProperty ( string objectTypeName, string propertyName, object propertyValue ) : bool
Start ( ) : void

Performs one-time initialization of this instance; called by Unity.

Update ( ) : void

Perform the update logic; called by Unity on every frame.

Method Details

AddGlobal() public méthode

Adds the specified global variable to the interpreter environment.
public AddGlobal ( string name, object value ) : object
name string
value object
Résultat object

CSI() public méthode

public CSI ( CSI callback ) : void
callback CSI
Résultat void

ClearHistory() public méthode

public ClearHistory ( ) : void
Résultat void

ClearHistory() public méthode

public ClearHistory ( string &history ) : void
history string
Résultat void

ClearOutput() public méthode

public ClearOutput ( ) : void
Résultat void

ClearOutput() public méthode

public ClearOutput ( string &outputText ) : void
outputText string
Résultat void

ExecuteCode() public méthode

Execute the specified code in the interpreter environment.
public ExecuteCode ( string inputText ) : bool
inputText string
Résultat bool

ExecuteFile() public méthode

Execute the specified file in the interpreter environment.
public ExecuteFile ( string inputFilename ) : bool
inputFilename string
Résultat bool

GetHistory() public méthode

public GetHistory ( ) : string[]
Résultat string[]

GetLastExecuteResult() public méthode

public GetLastExecuteResult ( ) : object
Résultat object

GetOutput() public méthode

public GetOutput ( ) : string
Résultat string

HasGlobal() public méthode

public HasGlobal ( string name ) : bool
name string
Résultat bool

Invoke() public méthode

Implements a helper method that can be used to execute a statement and hide the result from the interpreter output windows.
public Invoke ( Action action ) : void
action Action The action delegate to be executed.
Résultat void

IsEditorAvailable() public méthode

public IsEditorAvailable ( ) : bool
Résultat bool

RemoveGlobal() public méthode

public RemoveGlobal ( string name ) : bool
name string
Résultat bool

Select() public méthode

public Select ( GameObject gameObject ) : bool
gameObject GameObject
Résultat bool

Select() public méthode

public Select ( IEnumerable unityObjects ) : bool
unityObjects IEnumerable
Résultat bool

Select() public méthode

public Select ( Transform transform ) : bool
transform Transform
Résultat bool

Select() public méthode

public Select ( UnityEngine unityObject ) : bool
unityObject UnityEngine
Résultat bool

Select() public méthode

public Select ( object obj ) : bool
obj object
Résultat bool

Property Details

bottomMargin public_oe property

public float bottomMargin
Résultat float

includeAsset public_oe property

public Object,UnityEngine includeAsset
Résultat UnityEngine.Object

includeFile public_oe property

public string includeFile
Résultat string

leftMargin public_oe property

public float leftMargin
Résultat float

maxHistorySize public_oe property

public int maxHistorySize
Résultat int

maxOutputLineCount public_oe property

public int maxOutputLineCount
Résultat int

maxOutputLineWidth public_oe property

public int maxOutputLineWidth
Résultat int

maxOutputSize public_oe property

public int maxOutputSize
Résultat int

queuedAsset public_oe property

public Object,UnityEngine queuedAsset
Résultat UnityEngine.Object

rightMargin public_oe property

public float rightMargin
Résultat float

showInteractiveGUI public_oe property

public bool showInteractiveGUI
Résultat bool

showOutputAsEditorSelection public_oe property

public bool showOutputAsEditorSelection
Résultat bool

showOutputText public_oe property

public bool showOutputText
Résultat bool

showTooltipText public_oe property

public bool showTooltipText
Résultat bool

splitterFraction public_oe property

public float splitterFraction
Résultat float

toolboxWidth public_oe property

public int toolboxWidth
Résultat int

topMargin public_oe property

public float topMargin
Résultat float