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. Handlers & Managers
  4. Audio Manager
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

Audio Manager

Author: admin 350 views

Workflow

Audio is entirely managed by the ‘Audio Manager’ component, which is attached the Managers > Audio game object. This component receives audio clips from ‘UI Manager’, manages overall volume via ‘Audio Mixer’, and plays audio clips through ‘Audio Source’.

There are three types of audio mixer groups you can use. For example, you can set ‘Music’ to the ‘Output’ field of any audio source component. If you want to use your own audio mixer, you can assign any of your mixers to the ‘Audio Mixer’ field. Make sure to create groups with the same name as in the image below and expose the parameters.

You can click here to learn more about audio mixers.

You can click here to learn how to expose parameters.

Scripting

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

public class SampleClass : MonoBehaviour
{
    [SerializeField] private UIManagerAudio audioManager;

    void Start()
    {
        // Set volume between 0.0001 and 1
        audioManager.SetMasterVolume(0.5f);
        
        // Mute or unmute overall audio
        audioManager.Mute();
        
        // Enable or disable key strokes
        audioManager.EnableStrokes(true);
    }
}
				
			

How can we help?

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

© 2024 Michsky