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

Messaging

Author: admin 186 views

Workflow

Functional messaging app which supports getting and sending messages at runtime.

Messaging app depends on its manager and scriptable objects. In order to add a new chat, you have to create a new chat asset from Assets > Create > DreamOS > New Messaging Chat. You can now select Canvas > Managers > Messaging and add hit add a new chat, and then assign the asset you’ve created. Each item has its own unique title and person data. All of the messages in the chat asset will be generated at runtime.

Save Message History

It is possible to save sent messages at runtime. You can select the ‘Messaging Manager’ component, open the settings tab, and enable the ‘Save Message History’ option. Afterwards, make sure to add and assign the ‘Message Storing’ component.

Scripting

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

public class SampleClass : MonoBehaviour
{
    [SerializeField] private MessagingManager messagingApp;

    void YourFunction()
    {
        // Force chat data to be updated
        messagingApp.Initialize();

        // Get layoutIndex from chat title
        int layoutIndex = messagingApp.GetChatLayoutIndexFromTitle("Chat Title");

        // Instantiate standard messages - you can leave parent as null and set a layoutIndex instead
        messagingApp.CreateMessage(layoutIndex, "Message content");
        messagingApp.CreateIndividualMessage(layoutIndex, "Message content");

        // Instantiate date indicator - you can leave parent as null and set a layoutIndex instead
        messagingApp.CreateDate(layoutIndex, "21 Jul, 2020");

        // Instantiate image message - you can leave parent as null and set a layoutIndex instead
        messagingApp.CreateImageMessage(layoutIndex, Sprite sprite, "Title", "Description");
        messagingApp.CreateIndividualImageMessage(layoutIndex, Sprite sprite, "Title", "Description");

        // Instantiate audio message - you can leave parent as null and set a layoutIndex instead
        messagingApp.CreateAudioMessage(layoutIndex, AudioClip audio);
        messagingApp.CreateIndividualAudioMessage(layoutIndex, AudioClip audio);

        // Create storyteller
        messagingApp.CreateStoryTeller("Message/Chat ID", "StoryTeller Item ID");

        // Enable or disable specific dynamic message reply
        messagingApp.EnableDynamicMessageReply("Message ID");
        messagingApp.DisableDynamicMessageReply("Message ID");

        // Allow or disallow input submit
        messagingApp.AllowInputSubmit(true);

        // Change persona status
        messagingApp.ChangeStatus(MessagingManager.Status.Offline, "Chat Title");
    }
}				
			

How can we help?

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

© 2024 Michsky