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

Bug Weird AudioMixer script error

Discussion in 'Editor & General Support' started by Iamg1004, Aug 7, 2022.

  1. Iamg1004

    Iamg1004

    Joined:
    Feb 7, 2021
    Posts:
    17
    After searching through my code (https://hastebin.com/dopavejiko.csharp), I'm 100% sure that the following part is causing the error (In the attached file):

    Code (CSharp):
    1.     public AudioMixer AudioMixerG;
    2.     public AudioMixer AudioMixerM;
    3.     public AudioMixer AudioMixerE;
    Why is this? I've tried reimporting, rewriting, checking for duplicates, and nothing changes. Why is it? It only happens the second time I enter the scene, not the first, which is something I find double weird.

    If it helps, I'm in Unity 2021.3.1f1
     

    Attached Files:

  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,518
    Smells more like a packages issue to me... is it this noise?

    Extra unwanted packages in new projects (collab, testing, rider and other junk):

    https://forum.unity.com/threads/temp-unityengine-testrunner-dll-error.1133938/#post-7287748

    About the fastest way I have found to make a project and avoid all this noise is to create the project, then as soon as you see the files appear, FORCE-STOP (hard-kill) Unity (with the Activity Manager or Task Manager), then go hand-edit the Packages/manifest.json file as outlined in the above post, then reopen Unity.

    Sometimes the package system gets borked from all this unnecessary churn and requires the package cache to be cleared:

    https://stackoverflow.com/questions/53145919/unity3d-package-cache-errors/69779122