Forum rules - please read before posting.

Movement template: 2D first-person DEMO Error message

Hi there,

I'm new to the AC scene and trying to build our first-person mobile escape game with AC and Unity. Our aim is to have a set of rooms, where player is able to turn the camera in four directions.

I was going to look into the "Movement template : 2D first-person" and downloaded it on my project, but I'm unable to run the demo and see what can be achieved with it. I've assigned the managers, as the ReadMe instructs, but whenever I press play, I get this error message:

Error CS7036: There is no argument given that corresponds to the required formal parameter ':fadeCurve' of 'MainCamera.Crossfade(float,_Camera, AnimationCurve)'

You can find a picture attached.

Apparently something is wrong with the camera script? I'm using the latest version of AC with Unity 2019.3.10f1

Thanks!

Comments

  • Welcome to the community, @Emmilie.

    Apologies for the trouble. The API changed recently which required a change to the package, but it should have been updated already.

    I've re-uploaded the new package - could you try downloading again and re-importing it? If you still have trouble, please share the full error message - stacktrace incuded - and I'll take a look.

  • Hi Chris,

    thanks for your swift reply! The problem indeed still continues, even after a new download. There is also an interesting issue connected to this: somehow Adventure Creator keeps removing itself from the project where the Movement template is involved. I've started the project already three times from scratch because I thought so far that I somehow messed it up, but yesterday I definitely first installed Adventure Creator, then Movement template, and now when I opened the project again, Adventure Creator Window is nowhere to be seen.

    Here is a picture of the full stacktrace nevertheless. https://imgur.com/a/ptJS9tj

  • edited December 2020

    Can you open up the CameraNode2D script and share the contents of the offending line, 209?

    It should read as the following:

    KickStarter.mainCamera.Crossfade (crossfadeTime, _camera, null);
    

    If it's something else, replace it with that and see how it works.

    somehow Adventure Creator keeps removing itself from the project

    It's still there, but Unity will not allow any non-Unity toolbar items and windows to open if there is a compilation (red) error when opening a project. Once we've fixed the issue, AC should come back.

  • The offending line looks clean in Visual studio, it doesn't have any error marks or comments in the code. It just reads:

    207 private void SwitchCamera (_Camera _camera)
    208 {
    209 KickStarter.mainCamera.Crossfade (crossfadeTime, _camera);
    210 }

  • Change line 209 to:

    KickStarter.mainCamera.Crossfade (crossfadeTime, _camera, null);
    
  • Problem solved, thanks Chris! B)

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.