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 

Modern UI Pack

  • Quick Start
  • How To (FAQs)
  • UI Elements
    • Button
    • Charts
    • Context Menu
    • Dropdown
    • Horizontal Selector
    • List View
    • Modal Window
    • Movable Window
    • Notification
    • Progress Bar
    • Slider
    • Switch
    • Tooltip
    • Window Manager
    • Other Elements
  • UI Manager
  • Others & Add-ons
  1. Home
  2. Modern UI Pack
  3. UI Elements
  4. Notification
Updated on August 3, 2022

Modern UI Pack

  • Quick Start
  • How To (FAQs)
  • UI Elements
    • Button
    • Charts
    • Context Menu
    • Dropdown
    • Horizontal Selector
    • List View
    • Modal Window
    • Movable Window
    • Notification
    • Progress Bar
    • Slider
    • Switch
    • Tooltip
    • Window Manager
    • Other Elements
  • UI Manager
  • Others & Add-ons

Notification

Author: admin 211 views

Deliver a message to your users! Just add a notification object and change some settings depending on your needs.

Notification Stacking

If you want to show notifications one by one, you can use this feature. In order to enable stacking, you can follow these steps:

  1. Create a parent object/rect for your notifications.
  2. Click Add Component and then add Notification Stacking component (Modern UI Pack > Notifcation).
  3. Select the notification object/prefab and then enable Use Stacking in the notification settings.

Properties

Property Type Function

icon

Sprite

Sets the header icon of the notification.

title

string

Sets the header title of the notification.

description

string

Sets the description of the notification.

isOn

bool

Returns the notification state.

useCustomContent

bool

Bypasses content properties (e.g. title) when enabled.

enableTimer

bool

Sets how long the notification will appear when enabled.

Scripting

				
					using UnityEngine;
using Michsky.MUIP; // MUIP namespace

public class SampleClass : MonoBehaviour
{
    [SerializeField] private NotificationManager myNotification; // Variable

    void YourFunction()
    {
        myNotification.icon = spriteVariable; // Change icon
        myNotification.title = "New Title"; // Change title
        myNotification.description = "New Description"; // Change desc
        myNotification.UpdateUI(); // Update UI
        myNotification.Open(); // Open notification
        myNotification.Close(); // Close notification
        myNotification.onOpen.AddListener(TestFunction); // Invoke open events
        myNotification.onClose.AddListener(TestFunction); // Invoke close events
    }

    void TestFunction()
    {
        Debug.Log("Test function");
    }
}				
			

How can we help?

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

© 2024 Michsky