static void StaticBlendingHandler(CinemachineBrain brain) { CameraState state = brain.CurrentCameraState; int numBlendables = state.NumCustomBlendables; for (int i = 0; i < numBlendables; ++i) { var b = state.GetCustomBlendable(i); CinemachineStoryboard src = b.m_Custom as CinemachineStoryboard; if (!(src == null)) // in case it was deleted { bool showIt = true; int layer = 1 << src.gameObject.layer; if (brain.OutputCamera == null || (brain.OutputCamera.cullingMask & layer) == 0) { showIt = false; } CanvasInfo ci = src.LocateMyCanvas(brain, showIt); if (ci != null) { src.PlaceImage(ci, b.m_Weight); } } } }
static void StaticBlendingHandler(CinemachineBrain brain) { //UnityEngine.Profiling.Profiler.BeginSample("CinemachineStoryboard.StaticBlendingHandler"); CameraState state = brain.CurrentCameraState; int numBlendables = state.NumCustomBlendables; for (int i = 0; i < numBlendables; ++i) { var b = state.GetCustomBlendable(i); CinemachineStoryboard src = b.m_Custom as CinemachineStoryboard; if (!(src == null)) // in case it was deleted { src.LocateMyCanvas(brain, true); src.PlaceImage(b.m_Weight); } } //UnityEngine.Profiling.Profiler.EndSample(); }