::After a grueling effort. I’ve sent your code through ChatGPT, and I’m happy to say that I’ve found the issue.
The problem was in your CameraManager.cs Awake()
method.
private void Awake()
{
if (Instance = == null)
{
Instance = this;
}
}
It’s almost impossible to recognize this as there is no errors with it and such…
The comparison operator = is used for assignment, not for comparison. Therefore, the condition if(Instance = null) will always assign null to Instance, and the code inside the if block will always execute.
This was such a small piece of code that it had me and you stumped.
Tell me if it works