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

Resolved Can not play a disabled audio source with prefab.

Discussion in 'Prefabs' started by Deleted User, Feb 27, 2023.

  1. Deleted User

    Deleted User

    Guest

    Hello! I am making an fps game for school. I have a zombie death sound but, I get the can not play a disabled audio source error.:mad::mad: My zombie is a prefab and the empty gameObject holding my sound is also a prefab (to have my zombie prefab be able to access my sound) and my audio source is definitely not disabled. Any help is appreciated.:)

    (Please tell me if I am posting this in the wrong forum.:D) Cap2ture.PNG Capture.PNG
     
  2. Deleted User

    Deleted User

    Guest

    I have fixed this.
     
  3. guitargice

    guitargice

    Joined:
    Feb 26, 2023
    Posts:
    1
  4. Deleted User

    Deleted User

    Guest

    @guitargice, you can fix this two ways. The first way is to edit the prefab by double-clicking the prefab file and creating an empty child of the prefab that contains the audio source, after that you can reference the child. Also, if it is a prefab and you are editing it from the prefab editor you can just drop the mp3/wav file onto the empty slot. It depends on your style. If you have any questions just reply to this thread.