Inline ActionScript support.
import UnityEngine.Flash; function Start() { ActionScript.Import("com.mycompany.mytool"); var name = "Lerpz"; var protocolversion = ActionScript.Expression.<int>("com.mycompany.mytool.GetProtocolVersionFromServer({0})", name); }
using UnityEngine.Flash; using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void Start() { ActionScript.Import("com.mycompany.mytool"); string name = "Lerpz"; int protocolversion = ActionScript.Expression<int>("com.mycompany.mytool.GetProtocolVersionFromServer({0})", name); } }
import UnityEngine.Flash import UnityEngine import System.Collections public class Example(MonoBehaviour): def Start() as void: ActionScript.Import('com.mycompany.mytool') name as string = 'Lerpz' protocolversion as int = ActionScript.Expression[of int]('com.mycompany.mytool.GetProtocolVersionFromServer({0})', name)
package com.mycompany { public final class mytool { public static function GetProtocolVersionFromServer(name: String): int { //talk the the flash api here. return 18; } } }
Expression | Emits an ActionScript expression translating variable and field references to their ActionScript names. |
---|---|
Import | Causes an import directive to be emitted in the ActionScript code generated for the current type. |
Statement | Emits a block of ActionScript code in the current method translating variable and field references to their ActionScript names. |