I add an object reference to the _Camera class to store a reference to a Cinemachine virtual camera script.
I then disabled/deleted the _Camera editor inspector script, so as to reveal my newly added variable.
I drag the appropriate object into the inspector to assign it to the field in edit mode. Everything is fine. I run the game. Everything is still fine. I leave playmode, and after a moment, the object field is empty in the inspector, the reference is lost.
I've tried removing all Cinemachine references and testing with a normal Transform reference. The problem persists.
Is there something about how AC stores/saves data that could cause this?
Thanks!
Comments
On a side note: the _Camera component is designed to be sub-classed, so you can make a new class that has any changes you need, without having to amend AC's core scripts, and still have it talk to AC's camera system.