Michsky – Docs Michsky – Docs
  • Home 
  • Documentation 
    • Hex UI 
    • Beam UI 
    • Reach UI 
    • Heat UI 
    • DreamOS 
    • Modern UI Pack 
    • Loading Screen Studio 
    • Dark UI 
    • Motion Titles Pack 
  • Contact 
Michsky – Docs Michsky – Docs
Michsky – Docs
  • Home 
  • Documentation 
    • Hex UI 
    • Beam UI 
    • Reach UI 
    • Heat UI 
    • DreamOS 
    • Modern UI Pack 
    • Loading Screen Studio 
    • Dark UI 
    • Motion Titles Pack 
  • Contact 

Hex UI

  • Quick Start
  • Animations
  • Controller & Input
    • Controller Manager
    • Controller Presets
    • Hotkey Event
    • UI Navigation
  • Handlers & Managers
    • Audio
    • Chapters
    • Credits
    • Effects
    • In-Game
  • Localization
    • Getting Started
    • Localization Settings
    • Localization Manager
    • Localized Object
  • UI Elements
    • Button
    • Dropdown
    • Modal Window
    • Notifications
    • Panel Manager
    • Progress Bar
    • Selectors
    • Slider
    • Switch
    • Timer
    • Widgets
    • Others
  • UI Manager
  • Others & Add-ons
  • FAQs
  1. Home
  2. Hex UI
  3. Localization
  4. Localized Object
Updated on May 19, 2024

Hex UI

  • Quick Start
  • Animations
  • Controller & Input
    • Controller Manager
    • Controller Presets
    • Hotkey Event
    • UI Navigation
  • Handlers & Managers
    • Audio
    • Chapters
    • Credits
    • Effects
    • In-Game
  • Localization
    • Getting Started
    • Localization Settings
    • Localization Manager
    • Localized Object
  • UI Elements
    • Button
    • Dropdown
    • Modal Window
    • Notifications
    • Panel Manager
    • Progress Bar
    • Selectors
    • Slider
    • Switch
    • Timer
    • Widgets
    • Others
  • UI Manager
  • Others & Add-ons
  • FAQs

Localized Object

Author: admin 47 views

Acts as a bridge between objects and managers, applies table output to the object.

Workflow

With this component, you can get the output of localization key within the selected table. Depending on the selected object type, the output value will be applied to the component (e.g. TextMesh Pro). As long as ‘On Enable’ is selected as the preferred update mode, the object will be updated when activated.

You can use the search bar to easily assign a localization key. You can click on a search result to automatically complete the ‘Localization Key’ field. As long as the ‘Show Output’ option is enabled (checkbox next to the text field), you will see the output in all available languages.

Tip: You can use the ‘Edit Table’ button to quickly view and modify the selected table.

How Do I Localize My Own Objects?

You can basically add this component to localize custom objects. For instance, you can follow these steps to localize a TMP object:

  • Select the TMP object
  • Hit ‘Add Component’
  • Navigate to Reach UI > Localization > Localized Object
  • or just search for ‘Localized Object’
  • Set ‘TextMesh Pro’ as the preferred object type
  • Assign the TMP component to the ‘Text Object’ field
  • Assign a valid localization key

Scripting

				
					using UnityEngine;
using Michsky.UI.Hex; // Namespace

public class SampleClass : MonoBehaviour
{
    [SerializeField] private LocalizedObject locObject;

    void Start()
    {
        // Updates the component to get the latest data
        locObject.UpdateItem();

        // Reinitialize the component to apply core changes
        locObject.ReInitializeItem();

        // Get key output within the selected table
        locObject.GetKeyOutput("Localization Key");

        // Get key output within the specified table
        // No reference required for this call as it's static
        LocalizedObject.GetKeyOutput("Table ID", "Localization Key");
        
        // Example usage of GetKeyOutput
        string yourString = locObject.GetKeyOutput("Localization Key");
    }
}				
			

How can we help?

A premium WordPress theme with an integrated Knowledge Base,
providing 24/7 community-based support.

© 2024 Michsky