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 Import(package: string): void;
static void Import(string package);
static def Import(package as string) as void

Description

Causes an import directive to be emitted in the ActionScript code generated for the current type.

	import UnityEngine.Flash;
	
	ActionScript.Import("flash.utils.Dictionary");
using UnityEngine.Flash;
using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    void Example() {
        ActionScript.Import("flash.utils.Dictionary");
    }
}
import UnityEngine.Flash
import UnityEngine
import System.Collections

public class ExampleClass(MonoBehaviour):

	def Example() as void:
		ActionScript.Import('flash.utils.Dictionary')