My program doesn't have bugs. It just develops random features.

Legacy:Interface

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search

The concept of interfaces is available in UnrealEngine 3 UnrealScript and also in some UnrealEngine 2 games.

Syntax[edit]

Interface definitions look a lot like class definitions:

interface InterfaceName [extends ParentInterface] {modifiers}

Generally, all class modifiers are also allowed for interfaces. In reality, only the following two modifiers make sense:

DependsOn(type names
One or more classes and/or interfaces (separated by comma) that need to be parsed before this interface, because types declared in there are used by this interface. This modifier can be used multiple times.
(Parent interfaces need not be specified here because the compiler always parses parent classes first.)
Native(library name
Specified for interfaces that include native code.

Interfaces can define the following member types:

Interfaces may not contain states, variable declarations or replication blocks. Note that while a defaultproperties block is allowed, it wouldn't make much sense due to the lack of variables. Functions and delegates should not have any modifiers or body. Native interfaces may contain native functions, though.

Note: It is possible, but not advisable, to include a function body for functions and delegates. Functions and delegates must be redefined in classes implementing the interface and it is not possible to reach the interface's implementation of the function through something like the super keyword.

Usage[edit]

  • TODO

See Also[edit]


Category:Legacy To Do – explain usage