Forum rules - please read before posting.

2 red errors in old project

edited June 2016 in Technical Q&A
Hi!

I have re-launched a slightly old (6 months) project after having not opened it for a while and it wont play. Im getting 2 red errors:

Error removing component when merging prefab changes: Can't remove AudioSource because Sound (Script) depends on it

and

NullReferenceException: Object reference not set to an instance of an object
AC.MainCamera.SetFirstPerson () (at Assets/AdventureCreator/Scripts/Camera/MainCamera.cs:327)
AC.PlayerStart.SetPlayerStart () (at Assets/AdventureCreator/Scripts/Navigation/PlayerStart.cs:71)
AC.SceneSettings.FindPlayerStart () (at Assets/AdventureCreator/Scripts/Game engine/SceneSettings.cs:133)
AC.SceneSettings.OnStart () (at Assets/AdventureCreator/Scripts/Game engine/SceneSettings.cs:96)
AC.MultiSceneChecker.Start () (at Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:48)


Can you please be of assistance?

Im on Unity 5.3.5f1
and Adventure creator 1.51g

MArk

Comments

  • When updating AC, be sure to take note of all "Upgrade notes" for each new version in the changelog.  Will the game not run at all (Unity blocks the play button) or is it just not behaving correctly?

    The line references don't match up wth AC v1.51g so far as I can tell - have you edited the MainCamera script?

    It sounds like it can't find a Player prefab in your scene when the game runs, or at least not one with a First Person Camera component on it.  Have you got your prefab correctly assigned in the Settings Manager?

    I can't say much about the first error, I haven't heard of it before.  It sounds like it could be to do with updating the original Sound prefab by accident.  Try re-importing AC again.
  • Thanks Chris,

    No the game is starting up, (I can hear music playing) but the game window is dark, maybe showing the default camera view not hopping to the player cam.

    As I am in the process of re-building all my players (its possible to swap players in this game) so maybe I sort out the problem. But that first one, I have just re-imported AC. I did so before posting the above message. I had the same error before, and after update it still appeared.

    Maybe its not a show stopper when I get the player working...
  • edited June 2016
    Hmm look what I found... hidden in my _Sounds folder.. I suspect this has something to do with it!

    Only the first componante has the sound on it...
    On EVERY hit of the play button, it gets a new Audio Source added to it...

    image
  • This'll be an issue with Unity prefabs, rather than specifically AC, I'll bet.  You'll need to remove all but the very top Audio Source component, which you should be able to do with the following steps:

    1) Copy the very top Audio Source component (the cog icon on the right)
    2) Click "Revert"
    3) Overwrite the now-only Audio Source Component's values by pasting over it (the cog icon again)
    4) Make sure the Sound component is as it should be (Sound type = SFX etc)
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.