Forum rules - please read before posting.

Problems that occur only in the transition of scenes (without lighting and inventory does not work)

Good afternoon people. I have at least 3 problems reported here.

I used the base combat example downloaded here by the adventure creator.

First problem. In the first scene in the corridor the lighting is normal as shown in the 1st photo, the inventory selects the items correctly.(see photo) https://uploaddeimagens.com.br/imagens/dhDdSoU

When moving from one scene in the corridor to another in the room, the player only walks in the dark if the standard sound is not created, at the moment when I create the standard sound by the scene manager in A.C, the player does not move. is paralyzed in the dark. In this scene there is the standard lighting that I don't understand.
(See photo) https://uploaddeimagens.com.br/imagens/FPxhxI4

It is not entirely dark, it appears in very little light. This only happens from one scene to the next. If I test the game only in that scene, it works under normal lighting.
Second problem, the inventory is also dark (see photo), when the weapon is selected it does not appear.The Knife in the inventory when it is selected, it works, the shotgun does not.

https://uploaddeimagens.com.br/imagens/KPCjiE8

Third problem
Then, when I return to the corridor, the zombies killed on the floor become solid objects, if I kill two of them side by side, their solid obstructs the player's passage through the corridor.

Some errors that appear

(see photo)
https://uploaddeimagens.com.br/imagens/4TNGR8E

Comments

  • edited May 22

    I don't speak English very well, I used a translator. I'm Brazilian, in case the text gets weird to understand.

  • Welcome to the community, @RobinsonSandi.

    When moving from one scene in the corridor to another in the room, the player only walks in the dark if the standard sound is not created

    A bug existed with the existing package that caused an error if no Default Sound was assigned. I've updated the package to fix this - please give it another try. If you still get issues, check the Console window for messages, and also enable the AC Status box to see if AC is currently in Normal gameplay or not. The AC Status window can be turned on at the bottom of the Settings Manager, and will appear in the top-left corner of the Game window.

    In your second photo, only the lighting on your character looks off. Are you using pre-renderered backgrounds? It looks like a lightmapping issue - if so, it may only be a Unity Editor issue, so check how things look when running the game as a build. If this is to do with lightmapping, you might be able to fix it by going to Unity's Lighting window, unchecking "Auto generate?" at the bottom, and manually generating the lighting from the button beside it.

    Second problem, the inventory is also dark (see photo)

    Make sure you have a layer named Inventory defined in your Project Settings. Items viewed in the Inventory will be placed on this layer, and the inventory camera will be set to only view objects on this layer. This prevents your regular scene / characters from being visible during this time.

    To light up the items, you will need to have a light shining on them. If the scene's default lighting doesn't light them up, create a special "Inventory" light to light them up specifically. Items viewed in the Inventory will appear at the scene's origin, so try placing down a Light near the scene's origin, and set its "Culling Mask" to "Inventory", so that it only lights up the Inventory items.

    Then, when I return to the corridor, the zombies killed on the floor become solid objects, if I kill two of them side by side, their solid obstructs the player's passage through the corridor.

    Thanks for reporting this issue - I have included a fix for this in the updated package as well. If you refresh the Downloads page, download it again and re-import it, it should be fixed.

    Some errors that appear

    The first three are Warnings about the cameras not being recorded in save-game files. To fix this, attach "Constant ID" components to the objects mentioned - Sala3Cam and Sala4Cam. For more on this topic, see the Manual's "Saving scene objects" chapter.

    The next two Warnings are to do with missing components on an object 'Door (5)' in your scene. There's no way to know if it's an AC component or your own - you should check the object's Inspector.

    The final Warning is related to the AC Music system not being assigned a track. If you're attempting to play music using AC's "Sound: Play music" Action, you will need to populate your Music Storage Window with AudioClips for each defined slot. The Music Storage Window can be opened from "Adventure Creator -> Editors -> Soundtrack -> Music storage" in the top toolbar.

  • OK. thanks, i will see these errors later on unity.

    I used pre-rendered 2.5D background that I created in the sweet home program.

    The doors I had duplicated from the original combat example, so I didn't make any changes, which is why the warnings came up.

    The sound of the background music I had in the scene '' CombatExampleScene '' I looked for the folder or another place that was to modify and exchange it for another song and I couldn't find it.

  • edited May 23

    Another error that I found and didn't find the solution yet was when I build the game in '' Build '' and in the game there are some flaws in the image background only in the '' CombatExampleScene '' scene (see photo2, photo 3 and photo 4), those of other scenes do not occur this failure. (see photo 1 and photo 5).

    photo1
    https://uploaddeimagens.com.br/imagens/x-gI5cE

    photo2
    https://uploaddeimagens.com.br/imagens/-EzAK5o

    photo3
    https://uploaddeimagens.com.br/imagens/0aiTzmE

    photo4
    https://uploaddeimagens.com.br/imagens/0lQZkPg

    photo5
    https://uploaddeimagens.com.br/imagens/WoXCzvw

    I reviewed it several times and I didn't find the problem, I adjusted the ratio several times of the background image and it didn't work.

    I had deleted the original set of floors and walls from the '' CombatExampleScene '' and replaced them with others

  • The sound of the background music I had in the scene '' CombatExampleScene '' I looked for the folder or another place that was to modify and exchange it for another song and I couldn't find it.

    I found it now

  • The doors I had duplicated from the original combat example, so I didn't make any changes, which is why the warnings came up.

    They're likely ProBuilder scripts, in that case. The example scene uses ProBuilder to generate the meshes, so you'll get an error if you don't have the ProBuilder package installed. You're also safe to remove the missing components, though.

    in the game there are some flaws in the image background only in the '' CombatExampleScene '' scene

    The background is displayed on the BackgroundImageUI object's RawImage component - check that your background texture is covering the whole span of the canvas.

    This background is rendered by the BackgroundCamera - select it in the Scene window at runtime, and check that this too is viewing it fully. Share screenshots if you'd like a second pair of eyes on things.

    However, the provided 3D example scene is not intended to be adapted into 2.5D. This is likely the cause of the problem - and may cause other unwanted issues. You can override the perspective in this scene by going to the GameEngine object, finding the Scene Settings component, checking "Override Camera Perspective" and setting the "Camera Perspective" to "Two Point Five D".

    If your fresh scenes don't have this issue, though, I'd recommend making this scene again with 2.5D as its intended camera perspective.

  • edited June 4

    However, the provided 3D example scene is not intended to be adapted into 2.5D. This is likely the cause of the problem - and may cause other unwanted issues. You can override the perspective in this scene by going to the GameEngine object, finding the Scene Settings component, checking "Override Camera Perspective" and setting the "Camera Perspective" to "Two Point Five D".

    It worked. thanks

  • Two Problems

    1) While I was adding items, a book and a bottle, I noticed that they are added to the inventory but they don't appear in the inventory, only their names. as you can see in the video, the bottle and the book appear on the floor on the scene screen alongside other items in the inventory as the items go through

    picture of the bottle object with the script

    https://uploaddeimagens.com.br/imagens/f3DXDjc

    2) When I go from one scene to another holding the shotgun, the player doesn't appear holding the gun and when I enter the inventory to use the shotgun, the gun doesn't appear in the player's nay, but the knife does.

  • I noticed that they are added to the inventory but they don't appear in the inventory, only their names

    Inventory prefabs need to be placed on the "Inventory" layer - this is used by the Inventory camera to make sure they are only visible when viewed at the correct time, with correct lighting.

    When I go from one scene to another holding the shotgun, the player doesn't appear holding the gun

    For the Player's state to be persistent across scenes, you'll need to remove the Player from your scene files. Assign the Player prefab in the Settings Manager, and AC will then spawn him automatically, keeping his state persistent during the scene change.

  • edited June 13

    Inventory prefabs need to be placed on the "Inventory" layer - this is used by the Inventory camera to make sure they are only visible when viewed at the correct time, with correct lighting

    I created a prefab sphere and added it to the items menu as you can see in the photos, I did it exactly like the other items already present in the Combat example. The only ''layer'' I found in the sphere object is marked as a pattern and the other objects have nothing marked.

    https://uploaddeimagens.com.br/imagens/xJKWTtI

    https://uploaddeimagens.com.br/imagens/hfD7158

  • What do you mean by "marked as a pattern"?

    Your sphere object is currently on the Default layer. This will need to be changed to a layer named Inventory, which the other item prefabs should already be on.

    The InventoryCamera prefab should also have its Culling Mask set to only the Inventory layer - this is how it only renders the inventory items and not the rest of the scene. Is this layer defined in your settings, and what layer is used by the other item prefabs?

  • edited June 14

    What do you mean by "marked as a pattern"?

    It worked. thanks. It got confused because the all items layer was not marked with nothing was blank and I kept looking for the inventory layer and nothing.
    Maybe a bug.

    Then I decided to create the ''inventory'' layer for all items, even the existing ones from CombatExample, and then in InventoryCamera select the Inventory mask. done that It worked. thanks.

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.