Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

static function Statement(formatString: string, params arguments: object[]): void;
static void Statement(string formatString, params object[] arguments);
static def Statement(formatString as string, *arguments as object[]) as void

Description

Emits a block of ActionScript code in the current method translating variable and field references to their ActionScript names.

	import UnityEngine.Flash;
	
	var v = 42;
	ActionScript.Statement("trace({0})", v);
using UnityEngine.Flash;
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    public int v = 42;
    void Example() {
        ActionScript.Statement("trace({0})", v);
    }
}
import UnityEngine.Flash
import UnityEngine
import System.Collections

public class ExampleClass(MonoBehaviour):

	public v as int = 42

	def Example() as void:
		ActionScript.Statement('trace({0})', v)