Namespace Unity.Cinemachine.Editor
Classes
CinemachineChannelNames
This class contains names for Cinemachine Channels. These work like Unity Layers, you can define and name them, and create masks to filter only the channels you want.
CinemachineImpulseChannels
This class contains setting for the Impulse system. Specifically, it holds the Impulse Channel definitions. These work like Unity Layers, you can define and name them, and create masks to filter only the layers you want.
CinemachineLensPalette
User-definable named presets for lenses. This is a Singleton asset, available in editor only
CinemachinePhysicalLensPalette
User-definable named presets for physical lenses. This is a Singleton asset, available in editor only
CinemachineTool
This is a generic Tool class for Cinemachine tools. To create a new tool, inherit from CinemachineTool and implement GetIcon(). Your new tool will need to have the [EditorTool("tool-name", typeof(CinemachineVirtualCameraBase))] attribute.
A tool will be drawn iff it has been registered using CinemachineSceneToolUtility.RegisterTool. This is generally done in the OnEnable function of the editor script of the cinemachine component (CinemachineVirtualCamera, CinemachineComponentBase), for which the tool was meant. To unregister, call CinemachineSceneToolUtility.UnregisterTool in the same script's OnDisable function.
To draw the handles related to the tool, you need to implement your drawing function and call it in the editor script's OnSceneGUI function. An alternative for drawing handles is to override this function's OnToolGUI or OnDrawHandles functions (see EditorTool or IDrawSelectedHandles docs for more information).
To check, if a tool has been enabled/disabled in the editor script, use CinemachineSceneToolUtility.IsToolActive.
SaveDuringPlay
For all registered object types, record their state when exiting Play Mode, and restore that state to the objects in the scene. This is a very limited implementation which has not been rigorously tested with many objects types. It's quite possible that not everything will be saved.
This class is expected to become obsolete when Unity implements this functionality in a more general way.
To use this class, drop this script into your project, and add the [SaveDuringPlay] attribute to your class.
Note: if you want some specific field in your class NOT to be saved during play, add a property attribute whose class name contains the string "NoSaveDuringPlay" and the field will not be saved.
Structs
CinemachineLensPalette.Preset
Lens Preset
CinemachinePhysicalLensPalette.Preset
Physical Lens Preset
Delegates
SaveDuringPlay.OnHotSaveDelegate
Delegate for HotSave notification