Search code examples
c#unity-game-engineridercinemachine

Namespace name "Cinemachine" could not be found


This is my code in my project

using UnityEngine;
using Cinemachine;

public class CameraCollider : MonoBehaviour {

    public void OnTriggerExit(Collider other) {
        Debug.Log("Test");
    }
}

I am using the Cinemachine Package. This is the error I get:

Assets\Scripts\CameraCollider.cs(2,7): error CS0246: The type or namespace name 'Cinemachine' could not be found (are you missing a using directive or an assembly reference?)

So far I've tried

  • Reinstalling Rider
  • Deleting Rider files in the project directory
  • Deleting .idea files

Solution

  • This ended up being an easier fix than I expected. The problem ended up being that the developer that I'm working with had created an assembly file that I didn't know existed. So I just had to add Cinemachine to that assembly file in the scripts folder.