Author Topic: Nguitools SoundVolume is constantly = 0  (Read 1803 times)

BenChew

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 12
    • View Profile
Nguitools SoundVolume is constantly = 0
« on: March 23, 2015, 08:41:54 AM »
I have no idea why my soundvolume is constantly = 0
I've tried searching the project for "soundvolume" and have commented all of them except "soundvolume = 1". But the problem still persist after i print soundvolume the next line and got "0"

any chances of cameras or NGUI gameobjects affecting it that I might have mistakenly touched?


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Nguitools SoundVolume is constantly = 0
« Reply #1 on: March 23, 2015, 10:00:35 AM »
NGUITools.soundVolume gets the PlayerPrefs-stored value of "Sound", as you can see by opening up NGUITools and looking at line 34. Maybe this is what you're running into? Aside from that, try adding Debug.Log to NGUITools.soundVolume setter to see where it's being called from.

BenChew

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 12
    • View Profile
Re: Nguitools SoundVolume is constantly = 0
« Reply #2 on: March 23, 2015, 10:09:59 AM »
PlayerPrefs's Sound is 0. Not sure why, as all my scripts doesn't set this playerprefs

Sorry, how do I Debug.Log it to see where it's called from?
gameObject.name seems to not be the solution, haha

BenChew

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 12
    • View Profile
Re: Nguitools SoundVolume is constantly = 0
« Reply #3 on: March 23, 2015, 10:17:11 AM »
Okay, the problem doesn't occur anymore.
I turned my own sound playerprefs off and on again. The problem disappeared

Thanks!