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 

DreamOS

  • Quick Start
  • Animations
  • Apps & Windows
    • App Library
    • Creating New Apps
    • Commander
    • Game Hub
    • Mail
    • Messaging
    • Music Player
    • Notepad
    • Photo Gallery
    • Reminder
    • Settings
    • Video Player
    • Web Browser
    • Widget Library
  • Handlers & Managers
    • Audio Manager
    • Boot Manager
    • Data Manager
    • Date & Time
    • Events
    • Mod Manager
    • Multi Instance Manager
    • Network Manager
    • Notification Manager
    • User Manager
    • World Space Manager
    • Window Manager
    • Wallpaper Manager
  • Localization
    • Getting Started
    • Localization Settings
    • Localization Manager
    • Localized Object
  • UI Elements
    • Button
    • Context Menu
    • Modal Window
    • Selectors
    • Slider
    • Switch
  • UI Manager
  • Others & Add-ons
    • Steam Messaging
  1. Home
  2. DreamOS
  3. Localization
  4. Localized Object
Updated on July 4, 2023

DreamOS

  • Quick Start
  • Animations
  • Apps & Windows
    • App Library
    • Creating New Apps
    • Commander
    • Game Hub
    • Mail
    • Messaging
    • Music Player
    • Notepad
    • Photo Gallery
    • Reminder
    • Settings
    • Video Player
    • Web Browser
    • Widget Library
  • Handlers & Managers
    • Audio Manager
    • Boot Manager
    • Data Manager
    • Date & Time
    • Events
    • Mod Manager
    • Multi Instance Manager
    • Network Manager
    • Notification Manager
    • User Manager
    • World Space Manager
    • Window Manager
    • Wallpaper Manager
  • Localization
    • Getting Started
    • Localization Settings
    • Localization Manager
    • Localized Object
  • UI Elements
    • Button
    • Context Menu
    • Modal Window
    • Selectors
    • Slider
    • Switch
  • UI Manager
  • Others & Add-ons
    • Steam Messaging

Localized Object

Author: admin 82 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 DreamOS > 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.DreamOS; // DreamOS 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