Beispiel #1
0
        //private static readonly GUIContent kVirtualCameraLabel
        //= new GUIContent("Virtual Camera", "The virtual camera to use for this shot");

        private void OnEnable()
        {
            if (serializedObject != null)
            {
                mShot = serializedObject.targetObject as MYCinemachineShot;
                mVirtualCameraProperty = serializedObject.FindProperty("VirtualCamera");
                mVMPath = serializedObject.FindProperty("VmPath");
            }
        }
    public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount)
    {
        // Hack to set the display name of the clip to match the vcam
        foreach (var c in GetClips())
        {
            MYCinemachineShot            shot = (MYCinemachineShot)c.asset;
            CinemachineVirtualCameraBase vcam = shot.VirtualCamera;
            if (!vcam)
            {
                vcam = shot.GetCinemachineVm(go);
            }
            if (vcam != null)
            {
                c.displayName = vcam.Name;
            }
        }

        var mixer = ScriptPlayable <CinemachineMixer> .Create(graph);

        mixer.SetInputCount(inputCount);
        return(mixer);
    }