Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

[Cinemachine] Array index is out of range?

Discussion in 'Cinemachine' started by Glowing_Slab, Aug 31, 2018.

  1. Glowing_Slab

    Glowing_Slab

    Joined:
    Jun 19, 2015
    Posts:
    25
    I occasionally pick up lots of errors from the Cinemachine FreeLook cameras I'm using. Am I missing something obvious?

    Error is:

    IndexOutOfRangeException: Array index is out of range.
    Cinemachine.CinemachineFreeLook.UpdateCachedSpline () (at /Users/me/Library/Unity/cache/packages/packages.unity.com/com.unity.cinemachine@2.2.7/Runtime/Behaviours/CinemachineFreeLook.cs:634)
    Cinemachine.CinemachineFreeLook.GetLocalPositionForCameraFromInput (Single t)

    ... which makes me wonder if it's something to do with the vcam initial position?
     
  2. Gregoryl

    Gregoryl

    Unity Technologies

    Joined:
    Dec 22, 2016
    Posts:
    1,533
    I've never seen those. If you can manage to repro consistently, please file a bug report with full repro steps and we'll get right on it.
     
  3. SideEffectsDave

    SideEffectsDave

    Joined:
    Jul 16, 2018
    Posts:
    1
    We get the same error (seemingly at random and only within the editor). We can reproduce it (more or less consistently) when we build the project or publish/update the scene containing the Cinemachine Brain using Unity Collaborate. It first appeared when someone copied a Freelook Camera in the scene containing the Cinemachine Brain and published the changes using Unity Collaborate. After that the Freelook Cameras started exposing their Rigs in the hierarchy when activated/deactivated.

    To fix it we open a scene not containing a cinemachine brain then reimport the scene containing the Cinemachine Brain and the error is gone (at least for a while :D).
     
    Last edited: Sep 4, 2018
  4. Glowing_Slab

    Glowing_Slab

    Joined:
    Jun 19, 2015
    Posts:
    25
    Interesting! I also use Collaborate, and would certainly have copied a Freelook camera too. I use three Freelook cameras and two brains in the scene. I found the issue difficult to reproduce, but it only occurs in the editor. I have also seen some of the Freelook cameras exposing at least part of their rigs on occasion.
     
  5. JonneSir

    JonneSir

    Joined:
    Jun 27, 2018
    Posts:
    2
    I had this same problem. I restarted the scene and it seems to have dissapeared.
     
  6. Glowing_Slab

    Glowing_Slab

    Joined:
    Jun 19, 2015
    Posts:
    25
    Sometimes it takes a while to reappear, restarting has not solved the issue for me.