| Home Page | Recent Changes | Preferences

# Within

The within UnrealScript keyword is used to forward class member access to another containing class. The PlayerInput class is an example of this keyword used in UT2003.

### Example

    //
    // foo.uc
    //

    class Foo extends Object within Bar

    function DoSomething()
    {
      // This is a member of the Bar class.
      ++count;
    }

    //
    // bar.uc
    //

    class Bar extends Object

    var int count;
    var Foo MyFoo;

    function DoSomethingElse()
    {
      count = 0;
      MyFoo.DoSomething();
      assert( count == 1 );
    }

## Related Topics

- UnrealScript
  - Class Syntax

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

Mapping Topics

Mapping Lessons

UnrealEd Interface

Questions&Answers

Scripting Topics

Scripting Lessons

Making Mods

Class Tree

Questions&Answers

Modeling Topics

Questions&Answers

Log In