Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

What is the API to get/set ProjectSettings->Audio->Global Volume in C#

Discussion in 'Scripting' started by RecursiveFrog, Jun 3, 2020.

  1. RecursiveFrog

    RecursiveFrog

    Joined:
    Mar 7, 2011
    Posts:
    350
    I'm trying to access the value in ProjectSettings->Audio->Global Volume at runtime, but I have no idea how I'm supposed to find it.

    Is there a way to access this variable at runtime?

    It's actually fine if this only works in the Editor. I only care about the global volume while I'm in Editor Play Mode.

    globalvolume.png
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,522