Search Unity

Virtual Camera Presets

Discussion in 'Cinemachine' started by Ian094, Feb 18, 2019.

  1. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Hi,

    I am using the latest version of Cinemachine from the Package Manager (v2.2.8)

    I want to store a virtual camera as a Preset and load it from an editor script.

    Whenever I save a virtual camera component preset, the settings are lost in the preset:

    1.png

    If I try to change the Body or Aim settings in the preset, I get an error:

    2.png

    Is there something I am doing wrong or is it not possible to store a virtual camera component as a preset?

    Thanks in advance.
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    Unfortunately you can't store these as presets. The subcompopnents (composer, transposer, etc) are actually different components, and that paradigm isn't currently supported by the preset system.
     
    Ian094 likes this.
  3. Ian094

    Ian094

    Joined:
    Jun 20, 2013
    Posts:
    1,548
    Thanks for the reply.

    I guess using virtual camera prefabs would be the next best option to achieve what I am trying to do.
     
  4. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,730
    Yes, those work, but exercise caution as they are a little delicate. In particular, when editing a vcam prefab always drag it into your scene, edit the instance, then apply back to the prefab.
     
    Ian094 likes this.