Appearance
Visuals and previews
Visual resolvers
URicVisualResolver provides item names, descriptions, icon sizes, and dynamic icon materials. Set the resolver class through URicItemFragmentVisualResolver.
Call the fragment's FindOrConstructVisualResolver(Outer, Context, ItemInstance), or use the world URicVisualResolverSubsystem directly. Outer must provide a valid world.
Choose distinct numeric contexts when the same item needs separate presentations, such as a grid cell and an inspection panel.
Defaults and customization
The base resolver reads names and descriptions from the text fragment. Its icon size defaults to 100 × 100, and its dynamic-material implementation returns null.
For dynamic icons, subclass the resolver and implement GetDynamicMaterialInstance. Use OnInit, OnRefresh, and OnGameplayStatTagChanged for updates, and OnDestroy for cleanup.
A texture in the icon fragment does not by itself make the base resolver return a dynamic material; your UI can use that texture directly or provide a resolver implementation.
Cache identity and lifetime
Resolvers are cached by item GUID and context. Before GUID assignment, the subsystem keeps per-instance entries; it can promote and rebind them as IDs or item copies change.
Follow the ownership of the subsystem cache when sharing resolvers. Do not destroy a shared resolver every time one widget closes. Unbind your widget callbacks, and use subsystem Clear() when the relevant presentation scope is being reset.
Runtime preview worlds
URicPreviewSubsystem is a game-instance subsystem in the RicPreview client-only module. Call:
text
OpenPreview(ActorClass, LightActorClass, RenderTargetSize,
Distance, FOV, bTickWorld, Name)It returns FRicPreviewHandle containing the world, capture component, render target, displayed actor, and light rig. Check Handle.IsValid() before using it.
- Provide your item-display actor and light-rig actor classes.
- Bind
Handle.RenderTargetto the inspection widget. - Adjust the handle's capture or displayed actor as needed.
- Call
RefreshPreviewafter camera or visual changes. - Use
SetPreviewActorClassto replace the actor within the preview. - Call
ClosePreviewwhen the panel closes.
World ticking is optional and defaults to false. Enable it when the preview needs simulation or animation; the default distance is 200 and FOV is 90.
Cleanup
Always close preview handles when their UI is no longer needed. Cleanup() and subsystem destruction also have cleanup paths, but they do not replace normal panel lifetime handling.