The animator is now created for the camera object, and the camera object itself is configured in a hierarchy that'll make our work organized and clean going forward. The object structure is Navigator | Player | Main Camera, as shown earlier in the screenshot in the Animating the camera section. Now, it's time for us to define the core functionality of the main camera by scripting. Specifically, we'll create a new class, called Navigator. This will be responsible for moving the camera across its network of paths. To create a new script, right-click in the Project panel and choose Create | C# Script; name this as Navigator. Then, double-click on the file and open it inside MonoDevelop or another associated code editor, such as Visual Studio or Microsoft Code. The autogenerated class template will appear as follows:
using...