Search Unity

Prefab Blends

Discussion in 'Cinemachine' started by Deleted User, Nov 25, 2019.

  1. Deleted User

    Deleted User

    Guest

    Hello,

    We keep our levels in prefabs, each level contains some Virtual Cameras and a Main Camera with the Cinemachine Brain attached. We load in these level prefabs as the player goes to different areas.

    We have a custom blends scriptable object on the Cinemachine Brain for each level.

    The problem is that each level will have upwards of 10 virtual cameras, and when setting the FROM and TO drop downs, you can see that the list is populated with all the virtual cameras in the project, and not just the ones in the prefab. This is obviously not going to be manageable for the amount of levels we have planned.

    Can anyone think of a quality of life fix here? Is it doable to edit the source in order to organise the drop down list in terms of area/prefab (using a naming convention)

    Regards,
    Ian
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    7,711
    The dropdowns should contain only the vcams that are present in the currently open hierarchy. Not the entire project.

    You could certainly replace CM's builtin BlendSettings editor (CinemachineBlenderSettingsEditor.cs) with something more suited to your purposes. You'd have to comment out the old one (by modifying the package source), then Unity will pick up your replacement.

    Vcam matching in the custom blend list is by name only, so with lots of vcams a good naming convention is imperative.
     
  3. Deleted User

    Deleted User

    Guest

    Thanks very much @Gregoryl

    I will double check your first point.

    and I will move onto writing some custom editor code.

    Have a good day.