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. Commander
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

Commander

Author: admin 264 views

Workflow

Functional terminal/command app to call any kind of pre-defined command.

Commander app depends on its manager and command list. In order to add a new command, you can select the app and add a new command item to the list.

Scripting

				
					using UnityEngine;
using Michsky.DreamOS;

public class SampleClass : MonoBehaviour
{
    [SerializeField] private CommanderManager commanderApp;

    void YourFunction()
    {
        // Add a new command
        CommanderManager.CommandItem item = new CommanderManager.CommandItem();
        item.commandName = "Never gonna give you up"; // Not important - only for editor
        item.command = "/rickroll"; // Actual command - user needs to type this
        item.feedbackText = "Never gonna let you down"; // Feedback text
        item.feedbackDelay = 0.1f;
        item.onProcessDelay = 0f;
        item.onProcessEvent.AddListener(delegate
        {
            // Optional - you can add your events here
        });
        commanderApp.commands.Add(item); // Add new item to the manager

        // Create a new text feedback
        // Text, use typewriter, typewriter delay
        commanderApp.AddToHistory("Your text here", false, 0);

        // Clear history
        commanderApp.ClearHistory();

        // Set text and time color
        commanderApp.textColor = Color.red;
        commanderApp.timeColor = Color.green;

        // Enable or disable typewriter effect
        commanderApp.useTypewriterEffect = true;
        commanderApp.typewriterDelay = 0.03f;

        // Enable or disable help command
        commanderApp.enableHelpCommand = true;
    }
}				
			

How can we help?

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

© 2024 Michsky