The GUI - Casual Fantasy asset offers a structured collection of high-definition 2D interface visual elements, character frames, icons, and animated HUD components designed for fantasy-themed mobile and desktop applications. To maintain a stable 60+ FPS target on mobile hardware, implementing a optimized uGUI system layout is essential. Placing all UI panels under a single root Canvas component can lead to substantial CPU spikes during frame updates; any modification to a single UI element (such as a animated health bar or updating text field) marks the entire canvas as dynamic, triggering layout recalculations and batch rebuilds across all nested child nodes.
To mitigate performance degradation, organize your user interface into a segmented multi-canvas hierarchy:
Screen Space - Overlay or Screen Space - Camera with dynamic batching active.Reducing batch draw calls requires consolidating individual UI textures into optimized texture atlases using Unity's Sprite Atlas v2 system (UnityEngine.U2D.SpriteAtlas). When non-atlased sprites are rendered interleaved with custom TextMeshProUGUI font materials or 3D viewports, Unity's UI batching pipeline breaks, resulting in high draw call counts.
Group individual GUI textures—such as button sliced states, frame borders, and fantasy skill icons—into designated sprite atlases categorized by usage context (e.g., HUDAtlas.spriteatlasv2 and InventoryAtlas.spriteatlasv2). Ensure that Allow Rotation is disabled for sliced GUI graphics to prevent visual distortion along sliced 9-slice borders, and apply a 4-pixel to 8-pixel padding block to eliminate texture bleeding artifacts during dynamic display scaling.
By default, Unity assigns an enabled Image or TextMeshProUGUI component a dynamic hit target status by toggling on the Raycast Target property. When the user interacts with the screen, the engine's EventSystem performs spatial point-in-polygon checks via the active GraphicRaycaster against every enabled target across active canvases.
To reduce CPU raycast processing overhead:
// Utility script to programmatically clear unnecessary raycast targets across UI structures
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class UIComponentOptimizer : MonoBehaviour
{
public void StripUnnecessaryRaycastTargets(GameObject targetPanel)
{
Graphic[] graphics = targetPanel.GetComponentsInChildren<Graphic>(true);
for (int i = 0; i < graphics.Length; i++)
{
// Retain interaction capabilities only on explicit Button or Toggle structures
bool isInteractive = graphics[i].GetComponent<Selectable>() != null;
if (!isInteractive)
{
graphics[i].raycastTarget = false;
}
}
}
}
Adapting fantasy-style borders and window frames across disparate device aspect ratios (from 16:9 desktop monitors to 19.5:9 mobile display cutouts) requires strict adherence to anchor positioning rules combined with optimized Canvas Scaler configurations.
Configure the CanvasScaler on your core root canvases using the Scale With Screen Size mode. Define a reference resolution standard (e.g., 1920x1080) and tune the scaling parameters based on targeting criteria:
1920 x 1080 (Native artwork design target).Match Width Or Height0.5 for balanced scaling across non-standard portrait and landscape aspect ratios, or set to 1.0 (Height) for fixed vertical mobile titles.When anchoring complex frame graphics, avoid assigning raw, absolute unit pixel positions to RectTransform components. Anchor window backdrops using Stretch-Stretch configurations with defined inner margins. For localized UI elements such as action bars and close buttons, anchor to specific screen edges or corners using normalized pivot points (e.g., top-right pivot (1.0, 1.0) for modal dismissal buttons).
While automatic layout drivers like HorizontalLayoutGroup, VerticalLayoutGroup, and GridLayoutGroup simplify array alignments, they recalculate bounds on every transform alteration. Disable dynamic layout components at runtime via custom scripts once initial panel populating is complete, or utilize manual anchor offsets to prevent CPU frame stalls during heavy list populating operations.
Managing transitions, screen pop-ups, and character previews requires a lightweight runtime framework. Avoid using full mechanical Animator setups on complex UI trees, as active state machines dirty all child RectTransform values every frame, forcing constant mesh rebuilds in Canvas.SendWillRenderCanvases.
Use a unified canvas group controller to handle panel fading, scaling transitions, and raycast interaction blocking efficiently:
using System.Collections;
using UnityEngine;
[RequireComponent(typeof(CanvasGroup))]
public class UIPanelView : MonoBehaviour
{
[SerializeField] private CanvasGroup canvasGroup;
[SerializeField] private float fadeDuration = 0.2f;
private Coroutine currentFadeRoutine;
private void Awake()
{
if (canvasGroup == null)
canvasGroup = GetComponent<CanvasGroup>();
}
public void SetVisibility(bool visible)
{
if (currentFadeRoutine != null)
StopCoroutine(currentFadeRoutine);
currentFadeRoutine = StartCoroutine(TransitionRoutine(visible));
}
private IEnumerator TransitionRoutine(bool show)
{
float startAlpha = canvasGroup.alpha;
float targetAlpha = show ? 1.0f : 0.0f;
float elapsed = 0.0f;
if (show)
{
canvasGroup.blocksRaycasts = true;
canvasGroup.interactable = true;
}
while (elapsed < fadeDuration)
{
elapsed += Time.unscaledDeltaTime;
canvasGroup.alpha = Mathf.Lerp(startAlpha, targetAlpha, elapsed / fadeDuration);
yield return null;
}
canvasGroup.alpha = targetAlpha;
if (!show)
{
canvasGroup.blocksRaycasts = false;
canvasGroup.interactable = false;
}
currentFadeRoutine = null;
}
}
To integrate 3D character models and active skeletal animations alongside 2D interface windows, set up a dedicated preview pipeline using modern camera rendering structures:
UI_3D_Preview) and assign your target character model and lighting rigs to this layer.UI_3D_Preview. Set its clear flags to Solid Color with an alpha set to 0.Evaluating this asset's structure yields several clear operational features alongside workflow considerations for integration teams:
SpriteAtlas objects to prevent elevated draw call counts on low-end target hardware.| Category | 2D / GUI |
|---|---|
| Latest Version | v2.0.4 (2 tracked releases) |
| File Size | 21.04 MB |
| Added to Platform | February 6, 2026 |
| Views | 6 views |
| Downloads | 2 downloads |
| Favourites | 0 favourites |
| Official Store | Buy Original License on Unity Asset Store → |
| Issue with Package? | Report Broken Link → |