Forum rules - please read before posting.

Cinemachine: Integration issues (missing assembly?)

edited June 17 in Technical Q&A

Hi

Im having issues with the AC.Cinemachine integration. Ive read the manual.

I've integrated the AC.Cinemachine package. Unity Cinemachine is part of the project.

This results in various compile errors, all related to the AC.Cinemachine scripts in the AC_Cinemachine vsproj not being able to reference anything in the AC namespace/assembly, for example (removed project path names):

The type or namespace name 'Remember' could not be found (are you missing a using directive or an assembly reference?)  ...Assets\AdventureCreator\Downloads\Cinemachine integration\Assets\Scripts\RememberCinemachineVCam.cs

'RememberCinemachineVCam.SaveData()': no suitable method found to override  AC_Cinemachine  ...\Assets\AdventureCreator\Downloads\Cinemachine integration\Assets\Scripts\RememberCinemachineVCam.cs 

The Remember class exists in the AC namespace, of course.

I believe the issue is the AC.Cinemachine project cant see the main AC assembly. This is an area of Unity im not overly familiar with. I believe Unity manages these references via an assembly definition.

When I look at the AC.Cinemachine assembly definition (Assets/AdventureCreator/Downloads/Cinemachine integration/Assets/AC_Cinemachine.asmdef) I see a missing reference - see this screenshot.

https://ibb.co/Qvz1yGcS

I suspect its related. I dont see a assembly for AC to add, though.

Notes:

  • Adding a using AC directive to the scripts didnt work results in the same errors.
  • Explicitly referencing the AC namespace by editing the cinemachine scripts didnt work (ie public class RememberCinemachineVCam : AC.Remember) gives an error saying Remember is not part of the AC namespace.

Any ideas?

Comments

  • I can't reproduce the issue - what are your AC / Unity versions?

    The first entry in the AC_Cinemachine assembly definition file should be AC's own one, found in AC's Scripts folder. It should have gotten assigned manually - but if not, drop it in and click Apply.

  • edited June 18

    Hi

    I doubt you can reproduce. I strongly suspect this is specific to out project (possibly related to moving around some folders around in the past. I dont think the AC folder was moved, but its possible. I cant confirm atm).

    Unity: 2021.3.24f1
    AC: v1.79.3

    I figured the first entry fort the AC_Cinemachine asmdef was the issue - it shows as a missing GUID. The second entry is the Cinemachine asm def.

    The unity pop up to assign a new asm def dosent show anyting AC related (I would have done this yesterday). A recursive directory search of the entire unity project for *.asmdef /s shows nothing AC related.

    I tried adding a admdef for the AC scripts folder and get a duplicate asm def error - it conflicts with the AC_Cinemachine asmdef.

    Ill debug this a bit more, I should be able to figure it out now that I know this is the actual issue.

  • Actually, I just created a new project and can reproduce this:

    Unity: 2021.3.24f1
    AC: 1.79.3
    Cinemachine: 2.8.9

    • Project compiles and runs.

    Installed the Cinemachine unitypackage found here: https://adventurecreator.org/downloads

    This results in the same compile errors - none of the AC_Cinemachine code can see the Adventure Creator code.

    Error CS0246 The type or namespace name 'Template' could not be found (are you missing a using directive or an assembly reference?) AC_Cinemachine E:\AC-CleanInstall\AC-CleanInstall\Assets\AdventureCreator\Downloads\Cinemachine integration\Assets\Scripts\Editor\CinemachineIntegrationTemplate.cs

    The first entry in the assembly defintion references section is a missing GUID - it is not set to the Adventure Creator assembly, nor can I find it when I search.

  • The root AC asmdef file was introduced in v1.80. You should find that this issue doesn't occur in a fresh project with the latest AC release.

    If you're using an older version, you'd need to delete the download's asmdef file.

  • That 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.