I search for solutions in this order: Past Code, Unreal Source, Wiki, BUF, groups.yahoo, google, screaming at monitor. – RegularX

UE3:UIPrefab (UDK)

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UDK Object >> UIRoot >> UIScreenObject >> UIObject >> UIPrefab
Package: 
Engine
This class in other games:
UT3

This widget class is a container for widget archetypes.


Known issues: - [FIXED?] copy/paste operations aren't propagated to UIPrefabInstances - need support for specifying "input alias => raw input key" mappings for widget archetypes (UIInputAliasStateMap/UIInputAliasClassMap/UIInputConfiguration) - [FIXED?] reformatting doesn't occur for instanced UIList widgets or widgets which have UIComp_DrawString components (either when placing or updating). - [FIXED] modifying docking relationships using the docking editor doesn't propagate changes to instances. - [FIXED] most changes made through kismet editor (adding new seq. objects, removing objects, etc.) aren't propagated to instances at all

Properties[edit]

Property group 'Appearance'[edit]

OriginalHeight[edit]

Type: UIRoot.UIScreenValue_Extent

Modifiers: const


Default value:

Member Value
Orientation UIORIENT_Vertical
ScaleType UIEXTENTEVAL_PercentScene

OriginalWidth[edit]

Type: UIRoot.UIScreenValue_Extent

Modifiers: const

Stores the size of the bounding region for the prefab's widgets prior to becoming part of the prefab. This value is used as the initial size for PrefabInstances created from this prefab.

These extent values should always be resolved using the scene as the "OwningWidget"

Default value:

Member Value
ScaleType UIEXTENTEVAL_PercentScene

Internal variables[edit]

InternalPrefabVersion[edit]

Type: int

Modifiers: private, const

Version number for this prefab when it was loaded from disk. Used to determine whether a modification to a widget contained in this prefab should increment the PrefabVersion (i.e. PrefabVersion should only be incremented if InternalPrefabVersion matches PrefabVersion).

ModificationCounter[edit]

Type: int

Modifiers: transient, const

Used to track the number of calls to Pre/PostEditChange for widgets contained within this UIPrefab. When PreEditChange or PostEditChange is called on a widget contained within a UIPrefab, rather than calling the UObject version, it is instead routed to the owning UIPrefab.

When UIPrefab receives a call to PreEditChange, the UIPrefab calls SavePrefabInstances if ModificationCounter is 0, then increments the counter. When UIPrefab receives a call to PostEditChange, it decrements the counter and calls LoadPrefabInstances once it reaches 0.

PrefabPreview[edit]

Type: Texture2D

Modifiers: editoronly, const

Snapshot of Prefab used for thumbnail in the browser.

PrefabVersion[edit]

Type: int

Modifiers: const

Version number for this prefab. Each time a UIPrefab is saved, the PrefabVersion is incremented. This number is used to detect when UIPrefabInstances based on this prefab need to be updated.

Subobjects[edit]

WidgetEventComponent[edit]

Class: Engine.UIComp_Event

Inherits from: UIObject.WidgetEventComponent

No new values.

Structs[edit]

ArchetypeInstancePair[edit]

Modifiers: native, transient

This struct is used for various purposes to track information about a widget instance and an associated archetype.

UIObject WidgetArchetype 
Holds a reference to a widget archetype
UIObject WidgetInstance 
Holds a reference to the widget instance; depending on where this struct is used, could be an instance of WidgetArchetype

or might be e.g. the widget instance used to create WidgetArchetype (when creating a completely new UIPrefab).

float ArchetypeBounds[4] (EUIWidgetFace.UIFACE_MAX) 
Used to stores the RenderBounds of WidgetArchetype in cases where WidgetArchetype is not in the scene's children array.
float InstanceBounds[4] (EUIWidgetFace.UIFACE_MAX) 
Used to stores the RenderBounds of WidgetInstance in cases where WidgetInstance is not in the scene's children array.