Forum rules - please read before posting.

Weird bugs

edited May 2020 in Technical Q&A

sorry for bad eng.
at some point appeared this message:
https://imgur.com/a/M9hOYO3
i didn't touch my player model and i have navmesh agent before.
if i add navmesh agent integration and switch to unity navigation it will be ok. but! it worked ok before that. without integration and with mesh collider as pathfinding method.
in ac game editor in scene tab sometimes i can't select camera with cinemachine brain (it totally random).
and now i have this:
https://imgur.com/a/kUkAbBP
my main camera is on (before i run scene). when i run scene camera immediately get unchecked. if i turn off this script in game engine:
https://imgur.com/a/j6xf5P3
nothing changes. same error in console.
if i add Debug.Log(KickStarter.mainCamera) in Assets/AdventureCreator/Scripts/Game engine/MultiSceneChecker.cs:49 i'll get this:
https://imgur.com/a/Dw9tX2U
help.
it all worked literally couple hours ago (without navmesh agent integration, unity pathfinding and with cinemachine camera). i've added one model and one script. now nothing works. i've deleted that last model and script but my scene still broken.
unity 2018.4.22f1 linux

Comments

  • ok. so this was problem with Game Camera script from AC on my camera with cinemachine brain. even if i uncheck this script i still get broken scene. i completely removed this component and recreated game engine.

  • edited May 2020

    Welcome to the community, @gk82.

    What is your AC version, and are things now working?

    If your character uses a NavMeshAgent (and no other custom control script), then you will need a NavMeshAgent Integration component as well - regardless of whether the warning message was showing.

    Both of these components should only be used if you rely on Unity Navigation for pathfinding, however.

    If you disable the MultiSceneChecker component, then AC will not initialise.

    It looks like you have more components on your MainCamera than your screenshot shows. Best to not to attach anything to the AC MainCamera that affects its position, as it is intended to act similar to how the "Cinemachine Brain" works - in that it automatically takes the position of whatever GameCamera it is attached to (similar to how the Cinemachine Brain attaches itself to a Virtual Camera).

    If you want a custom camera control, attach your custom camera script to a new Camera object, and attach AC's Basic Camera component so that it can be selected in the Scene Manager's Default camera field as well as the Camera: Switch Action. For more details, see the Manual's "Adding custom cameras" chapter.

  • thanks. all ok. except i still can't select camera with cinemachine brain as default.

  • Have you attached a "Basic Camera" component to it? That will then allow it to be chosen in any of AC's camera fields.

  • edited May 2020

    i've added "basic camera", now i can select camera, but when i run game, i got this errors:
    https://imgur.com/a/xQUWCVS

    in action list on start game:
    https://imgur.com/a/cKpmGbd
    https://imgur.com/a/o2JUfMO

    when game is not running:
    https://imgur.com/a/EW82ESV

    even if i remove all cinemachine cameras and add new from AC game editor -> scene prefabs -> game cam 3-person, still got the same errors.

    AC: version 1.71.2

  • edited May 2020

    tried 2019 and 2018 version of unity

  • There'll be more to the error message that becomes visible when you select it - let's see a screenshot of the whole thing.

    When using Cinemachine, you'll need to attach AC's basic camera to the Cinemachine Brain - not the Virtual Camera. When using Cinemachine, CM itself will continue to use its own system to determine which VCam is active.

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.