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
The import syntax looks like this:
import package|enum|struct|class type [from package];
Importing packages
import package Engine;
Note: Works but the purpose of this is unknown.
Importing enums
import enum EDrawType from Engine;
Note: Crashes the the compiler, maybe wrong code?
Example
A complete example:
class MyActor extends Actor; import package Engine;
Declarations | Preprocessor • Classes • Interfaces • Cpptext • Constants • Enums • Structs • Variables (Metadata) • Replication block • Operators • Delegates • Functions • States • Defaultproperties (Subobjects) |
---|---|
Types | bool • byte • float • int • name • string • Object • Class • Enums • Structs (Vector ⋅ Rotator ⋅ Quat ⋅ Color) • Static arrays • Dynamic arrays • Delegates • Typecasting |
Literals | Boolean • Float • Integer • Names • Objects (None ⋅ Self) • Vectors • Rotators • Strings |
Flow | GoTo • If • Assert • Return • Stop • Switch • While • Do...Until • For • ForEach • Break • Continue |
Specifiers | Super • Global • Static • Default • Const |
UnrealScript | Syntax • .UC • .UCI • .UPKG • Comments • #directives • Native |
Page Categories
Page Information
Discussion
2022-11-18T08:29:19.698595Z
2014-02-27T21:03:57Z
Eliot
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!
https://wiki.beyondunreal.com/Import
Attribution-NonCommercial-ShareAlike 3.0