UDN
Search public documentation

UsingArchetypes
Licensees can log in.

Red links require licensee log in.

Interested in the Unreal engine?
Check out the licensing page.

Questions about UDN itself?
Contact the UDN Staff

Using Archetypes

Document Summary: This document covers how to create, utilize and manage archetype resources in UnrealEd.

Document Changelog: Created by Ron Prestenback; maintained by Richard Nalezynski.

Overview

Archetypes allow designers to take a snapshot of an existing Actor (including property values, components, object references), and save that snapshot as a placeable content resource, or template. Archetypes are stored in normal Unreal package files which are managed by designers, and allow the designer to place "instances" of the Archetype in maps, sequences, and UI scenes without requiring any programmer involvement. If a designer changes the default value of a property in an Archetype, that value is automatically propagated to all instances of that Archetype in existing levels and content except those instances which have had that property value customized. Changes to Archetype properties are propagated immediately to instances in the currently open level, and propagated to instances in other packages the next time those packages are loaded. You can also create an Archetype based on an Actor which is itself an instance of another Archetype. In this way, you can create complex hierarchies of Archetypes, where each Archetype "child" inherits the default values from its "parent" Archetype.

The current workflow for Archetypes is based around the Generic Browser instead of the Actor Class Browser.

Creating an Archetype

Archetypes are created from existing Actors that have been placed in the level. To create an Archetype, select the Actor that you would like to base the Archetype from. Right-click the Actor and select Create Archetype. You'll be presented a dialog for choosing the location for your new Archetype resource. Type in the desired values for the package, name, and group [optional] fields, then click OK.

The new Archetype resource will now be visible in the Generic Browser, located within the package you specified when the Archetype was created. In the Generic Browser's resource tree, click the package which contains your new Archetype. In the resource preview window, you should see an black box with the word "Archetype", which represents the Archetype you created. In the following screenshot, an Archetype was created for the Player Start and directional Light Actors from the ExampleEntry.umap in ExampleGame:

Archetype resource thumbnail in Generic Browser

Modifying Archetype Properties

Property values for Archetypes are edited using a standard property editor window. To open a property editor window for an Archetype resource, locate the Archetype resource thumbnail in the Generic Browser by selecting the package which contains the Archetype, then select the Archetype resource thumbnail corresponding to the Archetype you wish to modify. Either double-click the thumbnail, or right-click it and select Properties.... A property window for the Archetype resource will be displayed. Any changes made to the Archetype's property values will be propagated immediately to any existing Actors which are instances of that Archetype, as well as any Archetypes [which are currently loaded] which are based on that Archetype ("child" Archetypes).

Placing Archetypes

To place instance of an Archetype resource, select the Archetype resource thumbnail in the Generic Browser and right-click in one of the level editing viewports to bring up the context menu. Mouse over the Add Actor item to open the Actor placement submenu. Select the Add Archetype: {ArchetypeName} option to place an instance of the selected Archetype in the level. You can verify that this Actor is indeed linked to the Archetype you selected by opening the property editor window for the Actor you just placed, and expanding the Object category. The value for the ObjectArchetype property should be the Archetype resource you used to place the Actor. This indicates that when the Actor is loaded, it will automatically inherit all property value defaults from the Archetype resource specified.

Placing an instance of the Archetype 'ExampleArchetypePackage.LightArchetype'

You can use the ObjectArchetype property to determine which Archetype (if any) an Actor is using. If the Actor is not linked to an Archetype, the value for ObjectArchetype will point to the Actor's class default object, which has always has a name in the format Default__{ActorClass} (for example, Default__DirectionalLight).

The following image shows that DirectionalLight_0 is an instance of the ExampleArchetypePackage.LightArchetype Archetype resource:

Viewing the ObjectArchetype for an Actor

Archetypes Technical Guide

For a technical description of the way that Object Archetypes in UE3 work behind the scenes, see the Archetypes Technical Guide page.