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. Apps & Windows
  4. Widget Library
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

Widget Library

Author: admin 78 views

Workflow

Widget Library app depends on its manager and widget items. You can manage the available widgets or create your own using the ‘Widget Manager’ component – which is attached to the app window. All widgets will be generated at runtime.

Creating A New Widget

You can add or create your own widgets easily! Here’s a step-by-step guide:

  1. Select one of the existing widget prefab (you can locate to DreamOS > Prefabs > Widgets).
  1. Duplicate the prefab, delete/change its content and rename it as you want.
  1. Add a new widget item using the ‘Widget Items’ list.
  1. Assign the prefab to the ‘Widget Prefab’ field.

That’s it! Your widget will be generated at runtime. If you want, you can tweak some settings.

Scripting

				
					using UnityEngine;
using Michsky.DreamOS; // DreamOS namespace

public class SampleClass : MonoBehaviour
{
    [SerializeField] private WidgetManager widgetApp; // App variable

    void YourFunction()
    {
        // Enable widget by index
        widgetApp.EnableWidget(1);

        // Enable widget by id
        widgetApp.EnableWidget("Widget ID");

        // Disable widget by index
        widgetApp.DisableWidget(1);

        // Disable widget by id
        widgetApp.DisableWidget("Widget ID");
    }
}				
			

How can we help?

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

© 2024 Michsky