Mostly Harmless

Import

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 17:03, 27 February 2014 by Eliot (Talk | contribs) (New page for the keyword "Import", does anybody else know about this? This seems to compile and have an affect on the data in the compiled .u files, but the practical uses seems questionable!)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The UnrealScript keyword "Import" provides a way to define imports at the classes' scope. This keyword is officially undocumented and nowhere used by Epic Games, although it is available and compilable in the Unreal Engine 1 and 2. The keyword has been used by some licensees of the Unreal Engine.

Syntax[edit]

The import syntax looks like this:

 import package|enum|struct|class type [from package];

Importing packages[edit]

 import package Engine;

Note: Works but the purpose of this is unknown.


Importing enums[edit]

 import enum EDrawType from Engine;

Note: Crashes the the compiler, maybe wrong code?

Example[edit]

A complete example:

 class MyActor extends Actor;
 import package Engine;