Hi there, I'm new to both Adventure Creator and Unity, having switched over from Godot recently, so I apologize if the answer to this question seems like it should be obvious. I'm going through the 2.5D tutorial right now and I've gotten to the step where I'm trying to attach the background image to the camera.
I'm using URP and Unity 6 so the image doesn't show when I attach it and set the camera as active, so I searched the forum and found someone who had the same problem. The solution offered was to attach the script found in the following link as a component to a GameObject within the scene: https://adventure-creator.fandom.com/wiki/2.5D_games_with_URP
My issue is that, being a total newcomer to Unity, I'm not sure what kind of GameObject the script needs to be attached to. Does that mean any object in the scene, or a specific type?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Aha! Nevermind, I figured it out. It actually was super obvious after all.
Actually now there is a new problem. The floor grid is visible overlaying the image in preview for the first camera - the 'Waterfront Cam' - but not the other three. I've copy/pasted the transformation components from the reference cams for each, and set the images, but when I set them to active and go to the game window, only the image shows without the grid, so I can't tweek the positioning if needed. Why might this be, and how would I fix it?
Welcome to the community, @DrewAwen.
Do the cameras look over the scene in the correct places when viewed in the Scene window? The TutorialFiles package's Wharf scene should come with the Cameras already positioned in the right places. Is the floor grid showing correctly there?
When making a different camera, e.g. StepsCam, active - what is the state of the MainCamera's Camera stack? The wiki script should dynamically control what's going on there.
As this is a visual issue, any screenshots you can share from e.g. imgur.com will help clarify what's going on. If you can show the Inspectors of the MainCamera, the active Camera (e.g. StepsCam), and how things look in the Scene and Game windows, that should help me understand the situation.
Thanks for your reply, but I actually just figured it out. I just had to check the box next to the 'Camera' in the inspector for each. They all work perfectly now.
The only problem I'm having at this point is with the shader for the floor mesh - I'm working in URP so it just comes out pink and I've been able to make my own transparent shader for it, but not one that receives shadows. Is it okay to ask about that here or should I make a separate discussion about that?
Did you grab the URP variant of the "Tutorial Assets" package when starting the project? It makes changes to the included shaders/materials to make them URP-compatible.
If not, you can grab it here.
Yes I downloaded that and I'm pretty sure that's what I've been using.
Basically when I open the Wharf scene all the textures for the scene are pink. What I've done with other assets before is to run the render pipeline converter, select render settings and material upgrade and then initialize and convert. When I do this for the Wharf assets, the grid material seems to update just fine, but the MattShadow material remains pink.
I'm working on an M1 Macbook Pro, if that makes any difference.
Recreated - thanks for the feedback.
The URP variant of the TutorialFiles package should have materials already set to work with URP - however it looks like the MatteShadow shader isn't compatible with the latest URP version.
I've updated the shader - and the package - with an alternative that should work with the latest URP. Try re-downloading from the link above, and import just the MatteShadow material and shader assets (should be at the bottom of the import dialog box).
Okay, I tried it again and it works perfectly. Thanks so much for your quick responses!