For some reason, when I test my current scene, despite having a player start in it and having a working player prefab set to it, the game defaults to the main scene camera. I can't move or control the actual player. I've tried resetting the prefab and start assignments in the AC game settings.
The only other info I can give is that this started after I loaded an old project's autosave within this scene. Funnily enough, it teleported me to a camera within the demo basement scene. Now this bug occurs when I try testing my current scene, even after I found and deleted the test save files.
Comments
When you say the PlayerStart does not work, do you mean that the player does not appear at its position when the game begins? And this is assigned as the "Default PlayerStart" in the Scene Manager?
The default camera field is actually a part of the PlayerStart prefab, so solving the PlayerStart issue should also solve the camera one. Do any error messages appear in the Console window?
I can't say why this would happen after loading an auto-save, but hopefully we can find a workaround.
Your Managers may reset back to the Demo_ counterparts after an update, but they can be easily set back to your own game's by double-clicking their associaciated ManagerPackage asset file to re-assign them. Again, this is generated by the New Game Wizard - see the Manual's section 1.6 for more.
Hi, i'm having exactly the same issue. I created the first level and is working. Created second level, did everything like in first one, and is happening exactly this!
Even creating the other camera and making the default, starting the game it will display the unity default. I tried to delete it, and then the correct camera will be shown in game, but no player will be spawned at playerstart! I'm really confused, everything is set correctly...
even music isn't playing like in other level...
What do you mean by "displaying the unity default"? Any screenshots you can share that thow the scene, your Managers, and exactly what happens, will help give context to the situation.
Are any relevant messages appearing in the Console?
Just in case: be sure to use the same set of Managers for all your game's scenes. This is where "global" data such as your Player prefab, and music tracks, are stored. You don't need to use the New Game Wizard for each new scene you create.
I mean the "main camera" when you start the scene. I do not use the wizard for any new scene of course. I tried to create the scene again from start, now playerstart is working, camera view is correct in preview mode BUT when i styart game, Main camera is used in place of AC one
Do not know if is the reason, only thing changes is the "fang autotile" addon...
Is this to say there is a separate MainCamera object to the AC MainCamera?
Your scene's MainCamera - i.e. the Camera in your scene tagged as "MainCamera" - should have AC's MainCamera component. The Scene Manager should add this automatically.
If you have two MainCameras, you'll need to merge them. Again, if you can share screenshots showing how your scene is set up - Hierarchy and Inspectors of the Camera(s) included - will help clarify what's going on.
I'm not familiar with that asset - we can't rule out it having an effect.
Does this issue occur if you don't add this asset to the scene? Try with a fresh AC scene, adding a simple sprite to the scene, without the use of Fang AutoTile.
i know that Ac game camera is a reference for main camera and yes, main camera has Ac script on it. Actually the only issue i have is that if i change background color of Game Camera, when i press play i see the background of main camera and not the other one. Not a great issue, but in the first scene i set up is different and i fear that can be a problem someday. I will post some picture asap
This is by design. As the GameCamera is a reference only for the MainCamera, the MainCamera is what will perform the rendering. Its render settings - including the background colour - will be used instead of the GameCamera's.
If you want the GameCamera's background colour to be "transferred" to the MainCamera, you can do that through a simple script attached to the MainCamera:
Sorry, i'm here again but i'm still really confused about difference between Unity main camera and GameCamera object. Every time i set up a new scene i get crazy trying to make things work.
This time (creating a "map scene") i added a Gamecamera 2d object to the scene, but it wasn't working. I noticed it wasn't flagged as active (do not know why) so once i did it, the camera view was correct both in edit mode and once game started. So i added OnStart cutscene to remove inventory from view and everything was fine. Sent laptop in standby and once resumed, started again the game to discover that:
Camera view was again the Main Camera and not the Ac GameCamera
Inventory was again there (???) even if locked off in cutscene.
During gameplay shouldn't i see the view of Gamecamera object? And also, how is possible that things change without anything being modified in the meantime?
What are your AC/Unity versions?
The description isn't enough to understand the underyling issue. Can you take screenshots / record a video showing everything?
Ac camera missed Constant id number component. And i tagged it as "main camera", this because i needed to have the Outline visible in edit mode, just in order to places tiles correctly.
That caused the issue
As i put back the Main Camera tag to the unity camera, everything worked again.