S
S
Slavik Oleksiuk2017-01-12 14:05:06
Android
Slavik Oleksiuk, 2017-01-12 14:05:06

How to solve an error in unity when starting the game?

Hello everyone, I added a new play scene to my game, and when launched from the main menu using the play button, it gives an error:
MissingComponentException: There is no 'AudioSource' attached to the "Play" game object, but a script is trying to access it.
UnityEngine.AudioSource.Play () (at C:/buildslave/unity/build/artifacts/generated/common/modules/Audio/AudioBindings.gen.cs:590)
Buttons.OnMouseUpAsButton () (at Assets/scripts/Buttons.cs :34)
UnityEngine.SendMouseEvents:DoSendMouseEvents(Int32)
Music plays, but the play button doesn't function, and doesn't start another scene.
I'm just starting to learn unity, tell me how to fix it.
I would be grateful for all advice and comments.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2017-01-12
@my_england_id

Ну повесить на объект Play компонент AudioSource. У вас там похоже звук клика требуется.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question