Forum rules - please read before posting.

Errors on Camera Fade

Hi,

I have been getting some errors lately when doing camera fadeins and fadeouts.

null texture passed to GUI.DrawTexture
UnityEngine.GUI:DrawTexture(Rect, Texture)
AC.MainCamera:DrawCameraFade() (at Assets/AdventureCreator/Scripts/Camera/MainCamera.cs:413)
AC.StateHandler:OnGUI() (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:565)

I can get rid of the error on fadeout by assining a black texture but I can't do that on fadein.

Any idea what might be causing this? I upgraded to Unity 5.4 recently, could it be that?

Thanks,

Comments

  • strange sounds like it might be a missing texture? have you moved any AC files?
  • No I haven't, not on purpose anyway.

    If I knew what texture it tries to find and where it should be I can double check.

    Any ideas?
  • edited September 2016
    Umm, I'm not sure what AC uses for that, I guess you could try reimporting AC and see if that fixes the issue. but if the folder has been moved that wouldn't help much (because if unity recognizes a file is there already, it will just ignore it or overwrite it in its current location). 

    I'm not sure if it's those but on \AdventureCreator\Graphics\Textures there's a black.png and a fade.png it may be one of those. Check if the files are there. Also try checking if they're corrupted for some reason. Else try reinstalling AC. If you are using an older version read the update procedures in the manual to avoid resetting your managers or to avoid overwriting anything you may have tweaked from the demos, if you have. (Or plainly don't reimport the demos from the file list you get when you import.)
  • The files are all there and from what I see in my Git logs, nothing has really moved place (didn't really expect it to).

    I can try reinstalling AC but that seems to be a bit painful :(

    I will try and report back.

    Cheers,
  • edited September 2016
    What version of AC are you using?  Doesn't look like the latest - and we need to know to understand the console error.  Generally you should always try updating to the latest when you encounter a bug, to see if it's been fixed.
  • Hi Chris,

    Updated AC as discussed and while the error message is different, the result is still the same.

    Here is what I am getting:

    Cannot fade camera as no fade texture has been assigned.

    -----------------------------
    UnityEngine.Debug:LogWarning(Object, Object)
    AC.ACDebug:LogWarning(Object, Object) (at Assets/AdventureCreator/Scripts/Static/ACDebug.cs:26)
    AC.MainCamera:DrawCameraFade() (at Assets/AdventureCreator/Scripts/Camera/MainCamera.cs:426)
    AC.StateHandler:OnGUI() (at Assets/AdventureCreator/Scripts/Game engine/StateHandler.cs:572)

    Any clues from here?
  • Check your MainCamera's Inspector.  The Fade texture field should be set to /Assets/AdventureCreator/Graphics/Textures/black.png - if it isn't, assign it manually and try again.
  • Solved!

    Thanks Chris, perfect support as always.

    Cheers,
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.