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

Suggestion: Own error messages #8

Open
allesman opened this issue Aug 19, 2024 · 2 comments
Open

Suggestion: Own error messages #8

allesman opened this issue Aug 19, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request will fix An issue that'll be fixed in the future update at some point

Comments

@allesman
Copy link

Hi! Right now, when I accidentally put a non existent string in the Play() function, I get this error message:
NullReferenceException: Object reference not set to an instance of an object CarterGames.Assets.AudioManager.AudioPlayer.SetClip (CarterGames.Assets.AudioManager.AudioData clip, CarterGames.Assets.AudioManager.AudioClipSettings clipSettings) (at Assets/Carter Games/Audio Manager/Code/Runtime/Audio/Player/AudioPlayer.cs:192)
While this is perfectly fine, it would be cool to see where exactly in my code I used an invalid sound name.

@JonathanMCarter JonathanMCarter self-assigned this Aug 20, 2024
@JonathanMCarter
Copy link
Member

Thanks for reporting this. I'll have a look at this when I get a mo. Likely to be later this week.

@JonathanMCarter
Copy link
Member

Just to update, I've had a look at this. Overall a little overhaul to how audio is spawned is needed to improve the messaging to users for sure. I've noted that down for the 3.1.x update when I get around to it.

For now I'm able to see the call location of the error fine in the editor, It might be worth looking at the full log if the above is all you get in your logs.

A screenshot of me trying it in editor and seeing the full trace. I called to play in the test script, the last element of the stack.

image

@JonathanMCarter JonathanMCarter added enhancement New feature or request will fix An issue that'll be fixed in the future update at some point labels Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request will fix An issue that'll be fixed in the future update at some point
Development

No branches or pull requests

2 participants