Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Disable Audio in Batchmode

Discussion in 'Editor & General Support' started by zibizz1, Aug 6, 2013.

  1. zibizz1

    zibizz1

    Joined:
    Oct 11, 2012
    Posts:
    17
    Is there any option to disable all sounds in game and prevent them from loading in memory like with textures in -batchmode?

    We want to minimize ram usage of our server, and some MBs are used for AudioClips and AudioManager. Even if we remove AudioClips from scenes, wich will be quite painfull, i think still AudioManager will be using some valuable resources.
     
  2. djarcas

    djarcas

    Joined:
    Nov 15, 2012
    Posts:
    235
    Bump.
     
  3. 8bitRick

    8bitRick

    Joined:
    Nov 18, 2013
    Posts:
    11
  4. VisalDXP

    VisalDXP

    Joined:
    May 16, 2014
    Posts:
    7
    Bump... Same issue
     
  5. bphillips09

    bphillips09

    Joined:
    Aug 31, 2014
    Posts:
    36
    Bump, same question here.
     
  6. Pandanym

    Pandanym

    Joined:
    Dec 2, 2017
    Posts:
    17
    8 years later here I am, with my headless server playing sounds wondering how the hell is this info so hard to find in 2021
     
  7. ScaryMonsterStudios

    ScaryMonsterStudios

    Joined:
    May 8, 2014
    Posts:
    2
    how about creating a script that disabled the objects in servers. Attach it to any object you dont want to be running on the server.

    Code (CSharp):
    1.  
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5. using Mirror;
    6.  
    7. public class disableOnServer : NetworkBehaviour
    8. {
    9.      void Awake()
    10.     {
    11.         if(isServer)
    12.         {
    13.             gameObject.SetActive(false);
    14.         }
    15.      
    16.     }
    17.  
    18. }
     
  8. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
  9. kmowers

    kmowers

    Joined:
    Dec 12, 2016
    Posts:
    15
    Having the same issue and the AudioListener is inactive in the server build. Also can't find an option on the AudioListener inspector or via script to change the volume. Did anyone figure out how to do this?
     
  10. goodcjw2

    goodcjw2

    Joined:
    Aug 10, 2020
    Posts:
    3
    LoL, Unity...

    Those are really the reason to jump ship to Unreal...
     
  11. Sarudan

    Sarudan

    Joined:
    May 21, 2011
    Posts:
    65
    Nice, it's always helpful when idiots provide useful comments such as this. Thanks!