x


Two audio listeners - when loading a level

I have created a level, where the playable character walks up to the door, and on pressing e, the script will load a different level (in this instance a different part of the house).

I have now put the PC I copied from the previous level and placed it into the new one. When I try to run the new level, I get the message "two audio listeners" I assume this is becasue of my playable character being instanced again. I have tried to find a way to un-load the previous level, but there does not seem to be one. Are there any other suggestions?

more ▼

asked Jun 25 '12 at 09:24 PM

OTommy gravatar image

OTommy
0 1 1

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

All things from the previous level will be unloaded unless you specifically called DontDestroyOnLoad on it. So you must have 2 listeners in the new scene - check which of your game objects have an Audio Listener attached - perhaps a prefab you instantiate? Do you already have a PC in the new scene perhaps...

more ▼

answered Jun 25 '12 at 09:26 PM

whydoidoit gravatar image

whydoidoit
33.1k 12 23 101

(comments are locked)
10|3000 characters needed characters left

ah excellent. Stupid ol' me. I still had the main camera which comes with every new scene. That is now gone, and working without any problems. thank you.

more ▼

answered Jun 25 '12 at 09:35 PM

OTommy gravatar image

OTommy
0 1 1

No problem - one thing - on UA Answer means Solution and not Reply - no one gets this first time :) There is a hidden Add New Comment button on the right.

Also please tick my answer above to get it off the unsolved list :)

Jun 25 '12 at 09:37 PM whydoidoit
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x263
x27

asked: Jun 25 '12 at 09:24 PM

Seen: 413 times

Last Updated: Jun 25 '12 at 09:37 PM