Text Adapters

Used by text references to update text on UI components

Text adapters work behind the scenes and typically require no user interaction. It is only relevant for advanced scenarios or when using unsupported custom text components.

circle-info

Check out the default text adapter scripts: Sickscore Games > HUD Navigation System > Scripts > Utilities > Adapters.

Create Your Own Text Adapter

Need support for a custom text component? No problem.

Creating your own text adapter is straightforward:

  • Implement the IHNSTextAdapter interface

  • Use the SetText method to update your custom text component

This allows you to seamlessly integrate any text solution with the HNS system.

circle-check
// HNSTextAdapter_ThirdParty.cs

using SickscoreGames.HUDNavigationSystem;
using UnityEngine;

public class HNSTextAdapter_ThirdParty : MonoBehaviour, IHNSTextAdapter
{
    public void SetText(string text)
    {
        Debug.Log(text);
    }
}

Last updated