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
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.
https://picload.org/view/dloclwgl/picture1.png.html
https://picload.org/view/dloclwgi/picture2.png.html
https://picload.org/view/dloclwgw/picture3.png.html
https://picload.org/view/dloclwrr/picture4.png.html
https://picload.org/view/dloclwrl/picture5.png.html
https://picload.org/view/dloclwri/picture6.png.html
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
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?
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.
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 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...