Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

AudioSource in GameObject play automatically after start game.

Discussion in 'Editor & General Support' started by kiraler, Jul 8, 2014.

Thread Status:
Not open for further replies.
  1. kiraler

    kiraler

    Joined:
    Jul 8, 2014
    Posts:
    1
    Hi. I've added AudioSource as a component in GameObject, but when i play game that sound start automatically.
    I don't want start that sound automatically. I've tried uncheck "Play On Awake", but after that there's no sound playing from that GameObject.
    Can someone say what I should do?
    I have version 4.5.1f3
     
    Last edited: Jul 9, 2014
  2. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Show us the script you use to control the audio and we can help you otherwise were just guessing.
     
  3. S3dition

    S3dition

    Joined:
    Jan 6, 2013
    Posts:
    252
    You need to tell the audio when you want it to play using Audio.Play(); and make certain the audio listener is near it when it plays.
     
  4. architgargi20095

    architgargi20095

    Joined:
    Jul 10, 2021
    Posts:
    2
    Are we supposed to guess how to do it?
     
  5. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    39,571
    Well we're DEFINITELY not supposed to necro-post to nine-year-old threads! That's NEVER useful, and actually against forum rules.

    Instead, if you have a question, make your own post... it's FREE!

    When you post, remember we cannot read your mind so you must communicate properly.

    "how to do it?" is not a useful approach here.

    Instead let me offer you a handy step-by-step checklist to get your question into an actually-answerable state. it's quite easy to follow and it is short:

    How to report your problem productively in the Unity3D forums:

    http://plbm.com/?p=220

    This is the bare minimum of information to report:

    - what you want
    - what you tried
    - what you expected to happen
    - what actually happened, especially any errors you see
    - links to documentation you used to cross-check your work (CRITICAL!!!)

    If you post a code snippet, ALWAYS USE CODE TAGS:

    How to use code tags: https://forum.unity.com/threads/using-code-tags-properly.143875/

    The purpose of this forum is to assist people who are ready to learn by doing, and who are unafraid to get their hands dirty learning how to code, particularly in the context of Unity3D.

    This assumes you have at least written and studied some code and have run into some kind of issue.

    If you haven't even started yet, go check out some Youtube videos for whatever game design you have in mind. There are already many examples of the individual parts and concepts involved, as there is nothing truly new under the sun.

    If you just want someone to do it for you, you need go to one of these places:

    https://forum.unity.com/forums/commercial-job-offering.49/

    https://forum.unity.com/forums/non-commercial-collaboration.17/

    https://livehelp.unity.com/?keywords=&page=1&searchTypes=lessons

    You may consider trying your luck at ChatGPT. However, if you cannot understand the code ChatGPT makes you, nobody here can either. Remember this is YOUR game, not ours. We have our own games we're working on.
     
Thread Status:
Not open for further replies.