// Start is called before the first frame update
    void Start()
    {
        m_CinemachinePostProcessing = vcam.GetComponent <CinemachinePostProcessing>();
        //Debug.Log($"{m_CinemachinePostProcessing.Profile.GetSetting<DepthOfField>()}");

        m_Dof = m_CinemachinePostProcessing.Profile.GetSetting <DepthOfField>();
    }
    // Start is called before the first frame update
    void Start()
    {
        m_CinemachinePostProcessing
            = this.gameObject.AddComponent <CinemachinePostProcessing>();

        m_CinemachinePostProcessing.m_FocusTracksTarget = true;

        m_CinemachinePostProcessing.m_Profile = profile;
    }
示例#3
0
        private void Awake()
        {
            volume = gameObject.GetComponent <CinemachinePostProcessing>();

            volume.m_Profile = volume.Profile.Clone();

            volume.Profile.TryGetSettings(out depthOfField);
            volume.Profile.TryGetSettings(out chromaticAberration);

            playerDeathEventChannel       = Finder.PlayerDeathEventChannel;
            levelCompletedEventChannel    = Finder.LevelCompletedEventChannel;
            timelineChangedEventChannel   = Finder.TimelineChangedEventChannel;
            timelineController            = Finder.TimelineController;
            timeFreezeEventChannel        = Finder.TimeFreezeEventChannel;
            timeFreezeWarningEventChannel = Finder.TimeFreezeWarningEventChannel;
            timeFreezeController          = Finder.TimeFreezeController;
        }
示例#4
0
            static EditorInitialize()
            {
#if TEMP_FIX
                // We have PPv2
                CinemachinePostProcessing.InitializeModule();
#else
                // Check for PostProcessing V1.  Define symbol if we have it.
                if (Cinemachine.Utility.ReflectionHelpers.TypeIsDefined("UnityEngine.PostProcessing.PostProcessingBehaviour"))
                {
                    if (Cinemachine.Editor.ScriptableObjectUtility.AddDefineForAllBuildTargets("UNITY_POST_PROCESSING_STACK_V1"))
                    {
                        string path = Cinemachine.Editor.ScriptableObjectUtility.CinemachineInstallAssetPath + "/PostFX/CinemachinePostFX.cs";
                        UnityEditor.AssetDatabase.ImportAsset(path, UnityEditor.ImportAssetOptions.ForceUpdate);
                    }
                }
    #if UNITY_POST_PROCESSING_STACK_V1
                // We have PPv1
                CinemachinePostFX.InitializeModule();
    #endif
#endif
            }
示例#5
0
 // Start is called before the first frame update
 void Start()
 {
     m_CinemachinePostProcessing = GetComponent <CinemachinePostProcessing>();
     dof = m_CinemachinePostProcessing.Profile.GetSetting <DepthOfField>();
 }