Forum rules - please read before posting.

2.5D Adventure BackgroundImage does not load

Hi,

I am a absolute beginner with the Adventure Creator but have knowledge with the unity engine itsself.

I created a new title and new scene in a new 2.5 D Project.
I did exactly the same as the guy in the tutorial on Youtube.  https://www.youtube.com/watch?v=bf51Nc-gFxY&t=860s
I created a new Gamecamera, assigned new BG Image to it and under settings i assigned my Gamecamera as the default camera. I also set my Gamecamera as active. In the preview, i see the BG Image, but when i press on the play button, i only see the Skybox an the image is gone. I am pretty sure its a bug because of the newest version of Unity. But when i did somethin wrong, tell me. Please, i need help. Maybe someone could do the tutorial i posted and recognize, that the BG Image is not loading at beginning. 

Comments

  • Ok its a problem with the new version of unity. It doesn't work with Unity 2018.2.2f . It works with 2017. Pleeeeeease fix that.

  • Welcome to the community, @Fendtastic.

    Which AC version are you using, and which version of 2017 are you referring to?

    Changes were made to the 2.5D camera system to reflect updates introduced in 2017.3 and beyond - the tutorial was made before these changes, so it may be just that a minor tweak to your scene is needed.  If there is an issue, it'll be fixed of course.

    Rather than assigning bakground textures in a BackgroundImage object's GUI Texture component, they are now assigned in the "Background texture" field on that object's component of the same name.

    Let's see some full-screen screenshots of your GameCamera, MainCamera, and BackgroundImage Inspectors while the game is running, as well as a shot of the Scene view to show where the GameCamera is pointing.  Full-screen images will also allow me to see the Hierarchy.
  • Also: Check that the BackgroundImageUI object (which spawns it automatically at runtime) is placed on the BackgroundImage layer.  If it's not, you can amend the prefab directly within Assets/AdventureCreator/Resources.
  • I have the same problem.

    With 2017.3.1f1 it works without any problems. Same process with 2018.2.2f1 doesnt work. Here i see only the skybox, not the background.
  • Thanks for the information.

    All looks fine in the screenshots - we'll need to dig a bit deeper.  What's the state of the RawImage component on the BackgroundImageUI child?

    Let's also see the Inspector for the BackgroundCamera, as well as the expanded "Culling Mask" field of the MainCamera - both at runtime.  The Culling Mask for the BackgroundCamera should be set to BackgroundImage.
  • Here another few images. When i press play, the culling mask of main camera changes to mixed and it deselects Backgroundimage. But when i change to BackgroundImage while played. Nothing changes. See images.

    https://picload.org/view/dloigpgi/maincamculling.png.html
    https://picload.org/view/dloigpgw/rawimage.png.html
    https://picload.org/view/dloigprr/maincamrt.png.html
    https://picload.org/view/dloigpra/maincamrtcullingchanged.png.html


  • edited August 2018
    The MainCamera should be mixed, with BackgroundImage deselected.  You do not need to change that.

    Again, I need to see the BackgroundCamera's Inspector.  That Camera component's Culling Mask needs to match up with the layer that BackgroundImageUI is on - which should be BackgroundImage.

    I suspect that this is due to an issue with the way Unity manages its layers in 2018.2.
  • Hello Chris,

    I revive this issue, because I have similar problems. I use Unity 2018.3 and created a 2.5D Game.

    After setting up several cameras, I changed the background images in my assets-folder (just replaced them with new ones) and now AC does not show my bg anymore.

    You can look at a couple of screens here:

    https://www.gregorassfalg.de/AC/1.png
    https://www.gregorassfalg.de/AC/2.png
    https://www.gregorassfalg.de/AC/3.png

    Hope you can help me with that.

    Best

  • Welcome to the community, @macgregger. What AC version number are you using?

    Is this in Play mode, Edit mode, or both? In Edit mode, you will need to refresh the camera by clicking "Set as active" in its Inspector after changing the background.

    The texture import settings look fine - but what if you set the BackgroundImage component's Background texture field to e.g. one of the 2.5D tutorial's Wharf photos?

    The background should be displaying in the Game window via a RawImage component - a child of the BackgroundImageUI GameObject at the top of the Hierarchy. Can you share screenshots for both the child and the parent? What happens if you manually assign the graphic in the RawImage component's Texture field?

  • edited April 2019

    Hi @ChrisIceBox ,

    thanks for the quick response. I'm using AC 1.66.8.

    The screens I send you were in Edit Mode. And yes, I used the "set as active" funktion, but with no effect.

    I also used one of the warf photos - also with no effect.

    When I go into play mode and change the texture of the RAWImage manually then the desired BG is displayed. But the settings do not keep.

    Here you find the screens:

    https://www.gregorassfalg.de/AC/4.png
    https://www.gregorassfalg.de/AC/5.png
    https://www.gregorassfalg.de/AC/6.png
    https://www.gregorassfalg.de/AC/7.png

    Best

  • Is screen "7" taken after you manually assigned the texture?

    I'll need to see the scene for myself. If you can create a .unitypackage file of your game's subfolder (not AC - the one created by the New Game Wizard), that includes the scene and your Managers, PM it to me and I'll take a look.

  • Hi guys, it's 2023 and the problem is still there.

    i just bought the pack and i found myself in this problem while doing the first tutorial. :neutral:

  • edited May 2023

    Welcome to the community, @Deathkael.

    Apologies for your early frustration. Both AC and Unity are very different since this thread began. We'll be able to sort out your issues, but I'll need to get details on your project and issue from the top.

    To be clear: the issue is that your Background Image is not appearing when entering Play Mode?

    What is your Unity version, and what render pipeline are you using? By first tutorial, I'm assuming you're referring to this one.

    The background should appear due to the BackgroundCamera, which renders objects on the BackgroundImage layer, being drawn atop the MainCamera. The background itself is drawn from the BackgroundImageUI object - which should be added automatically when the scene loads.

    Make sure that you have a "Default Camera" assigned in your Scene Manager, and check that the BackgroundImageUI object is present at runtime - both on the BackgrounImage layer, and that its RawImage child object has been assigned as the intended background object.

    If you'd like toshare screenshots (uploaded via e.g. imgur) of these object Inspectors - as they appear at runtime - I'll take a look. Alternatively, you're welcome to PM me your project files if you'd like me to examine them directly. Rest assured we'll get things sorted.

  • Thanks for reply.

    I think I solved it, maybe partially.
    I saw that there are problems using URP with AC and I followed the suggestion in this topic

    adventurecreator.org/forum/discussion/10932/2-5d-camera-doesnt-work-for-urp

    Now I have another problem, I think related to the original one.
    When I load a save, the active camera is not changed.
    Using the save system, I don't know how to save the Active state of a Camera.
    I hope I was clear.

    Unity version: 2021.3.24f1
    BC: v1.77.4

  • AC's save system works by using specific component types to inform it of which objects you wish to have data saved for.

    In order for a camera to be "visible" to the save system, it must have an associated Constant ID value. You should find a warning in the Console regarding this when you save, if one is not present.

    You can generate one either manually - by attaching the "Constant ID" component to the GameCamera - or automatically by clicking the "Auto-add save components to GameObjects?" button in the Settings Manager.

    More on how the save system works can be found in the Manual's "Saving scene objects" chapter.

  • I just did all the steps, but it doesn't work. I need AC script to Remember the Acrive Camera.
    I think that this is my problem.
    I new on AC and unity programming :(
  • Have you added Constant ID components to all the GameCameras that could be active during gameplay?

    No programming should be necessary - adding the components should be enough.

    I'll need to see screenshots of your situation to understand what's going on. Can you share images of your camera Inspectors, as well as the state of the Console after saving/loading a game?

  • Thank you for support.

    I don't understand why, but now it's working... :D

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.