Changing Cinemachine camera priority

This custom Action allows you to change the priority of a Cinemachine camera. It is provided by @shredingskin on the AC forum.

An alternative script can be found here. using UnityEngine; using System.Collections; using System.Collections.Generic; using Cinemachine; using UnityEditor; namespace AC { [System.Serializable] public class ActionCinemachineCamera : Action { 		public CinemachineVirtualCameraBase CM_cam; public int cmCamConstantID = 0; public int cmCamParameterID = -1; private CinemachineVirtualCameraBase runtimeCMCam; public int Priority; public int priorityParameterID = -1; public ActionCinemachineCamera { 			this.isDisplayed = true; category = ActionCategory.Camera; title = "CM Priority"; description = "Changes CM priority"; } 		public override void AssignValues (List parameters) { 			runtimeCMCam = AssignFile  (parameters, cmCamParameterID, cmCamConstantID, CM_cam); Priority = AssignInteger (parameters, priorityParameterID, Priority); } 		override public float Run { 			if (runtimeCMCam) { 				runtimeCMCam.enabled = true; runtimeCMCam.MoveToTopOfPrioritySubqueue; runtimeCMCam.Priority = Priority; } 			return 0f; } 		#if UNITY_EDITOR override public void ShowGUI (List parameters) { 			cmCamParameterID = Action.ChooseParameterGUI ("CM camera:", parameters, cmCamParameterID, ParameterType.GameObject); if (cmCamParameterID >= 0) { 				cmCamConstantID = 0; CM_cam = null; } 			else { 				CM_cam = (CinemachineVirtualCameraBase) EditorGUILayout.ObjectField ("CM Camera:", CM_cam, typeof(CinemachineVirtualCameraBase), true); cmCamConstantID = FieldToID  (CM_cam, cmCamConstantID); CM_cam = IDToField  (CM_cam, cmCamConstantID, true); } 			priorityParameterID = Action.ChooseParameterGUI ("Priority:", parameters, priorityParameterID, ParameterType.Integer); if (priorityParameterID < 0) { 				Priority = EditorGUILayout.IntField ("Priority:", Priority); } 			AfterRunningOption ; } 		#endif } }
 * 1) if UNITY_EDITOR
 * 1) endif