Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library not re-generating #8

Open
omrirosen opened this issue Oct 29, 2020 · 4 comments
Open

Library not re-generating #8

omrirosen opened this issue Oct 29, 2020 · 4 comments

Comments

@omrirosen
Copy link

Hi again Jacky!

I've tested the audio manager on one scene. Works perfect. Then tried adding it to a different scene, and I get nothing when re-generating. No audio library is being built.

Under sound\music library in the component, i get an error saying "Something may have interrupted AudioManager..."

Am I doing something wrong?

Thanks again

@omrirosen
Copy link
Author

For example, when adding a music player to the new scene, I can't choose a music file for it to play, there are no options to choose from

@jackyyang09
Copy link
Owner

jackyyang09 commented Oct 30, 2020

That's strange, there are cases where AudioManager's enum generation can be interrupted by external forces such as compilation errors in other scripts, so check the console for those just to be sure.

Otherwise, try deleting the AudioManager in the scene (or the scene itself) and adding a new one in and see if that fixes anything.

I'm not able to recreate the bug you're encountering, so if you still run into it reply with the following info so I can see what's up:

  • Your Unity version and JSAM version
  • The steps you took to recreate the bug
  • Your Audio Assets folder location as listed in the AudioManager
  • A screenshot of your AudioManager settings and if possible, your Unity editor window

@Occuros
Copy link

Occuros commented Jul 21, 2021

It seems that the following code doesn't provide the desired behavior (in unity 2020.3.x)

Type.GetType(sceneSoundEnumName);

If in the AudioManger the following method is adopted:

public Type GetSceneSoundEnum()
{
            if (sceneSoundEnumType == null || sceneSoundEnumType.ToString() != sceneSoundEnumName)
            {
                // sceneSoundEnumType = Type.GetType(sceneSoundEnumName); => seems to currently not work
                sceneSoundEnumType = GetEnumType(sceneSoundEnumName);

            }
            return sceneSoundEnumType;
}

While using the same GetEnumType which is used in the AudioManagerEditor, I managed to get them to work again.

That method should probably best be externalized as a utility function and then used in both scripts.

Maybe that helps someone else?

@jackyyang09
Copy link
Owner

Thanks for the report and fix Occuros! I'll try investigating it on my end as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants