Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string expression = "2+2";
- public string evaluateExpresion(expression)
- {
- return executeJavascript(expression); // Magic javascript executor
- }
- Debug.Log(evaluateExpression(expression);
- // JavaScriptExpressions.js
- function executeExpression( x : string ) {
- // Some code here..
- }
- // YourCsharp.cs
- string expression = "2+2";
- public string evaluateExpresion(string expression) {
- return transform.GetComponent<JavaScriptExpressions>().executeExpression(expression);
- }
- Debug.Log(evaluateExpression(expression));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement