Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Nov 18, 2015 at 06:19 AM by Le-Pampelmuse for the following reason:

The question is answered, right answer could not be accepted because the accept button is not there. fffMalzbier gave the correct answer.

avatar image
0
Question by Le-Pampelmuse · Mar 12, 2015 at 12:01 PM · audiofilterpasslowcutoff

Unity 5: AudioLowPassfilter.cutoffFrequency not doing anything

Hello, today i have a script command for you, that doesn't work at all.

I want to change the cutoff frequency of an AudioLowPassFilter via script. It doesn't work.

It only changes if I do it manually in the inspector while the game is running.

Code:

 AudioLowPassFilter filter;
 public bool bool1;

 void Start()
 {
    filter = GameObject.Find("GameLogic").getComponent<AudioLowPassFilter>();
 }
 void Update()
 {
    if(bool1)
    {
       filter.cutoffFrequency = 5000f;
    }
    else
    {
       filter.cutoffFrequency = 100f;
    }
 }

I read in one older post that there was a bug where the value DID change, but it was not updated in the inspector.

Well, it does not work completely as of today. I'm using Unity 5.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Le-Pampelmuse · Mar 13, 2015 at 03:23 AM 0
Share

That is very very very strange. I read your comment and added:

 print(filter.cuttoffFrequency);

Into the Update function. It works now. :|

I don't know why and I certainly don't want to know :P Thanks for sharing your experience $$anonymous$$alzbier, maybe convert your comment into an answer so I can mark it as solved by that answer?

avatar image Le-Pampelmuse · Nov 11, 2015 at 08:31 PM 0
Share

Since the time I posted this question it has never happened again so I guess it was a 1:1.000.000 bug or patched in the meantime. Thank you.

1 Reply

  • Sort: 
avatar image
1

Answer by fffMalzbier · Mar 12, 2015 at 09:37 AM

I can observe that the cutoffFrequency actually changes but the inspector seems to not display the correct value at all.

You can add this to you update function to see the current value in the console log. Debug.Log (filter.cutoffFrequency);

Alternately you can set the inspector to debug mode (over the menu besides the small lock symbol) to see that the value changes. Looks like the inspector for the AudioLowPassfilter is just broken :(

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Audio Low Pass Filter Not Working 1 Answer

Where is the audio low pass rolloff curve GUI? (Unity 3) 1 Answer

Audio Analysis: isolating frequency values 1 Answer

Procedural native audio synthesis with OnAudioFilterRead 1 Answer

How do I manipulate 3 audio with 3 slider audio filter each at once? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges