Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Canvas.ForceUpdateCanvases throws ArgumentOutOfRangeException Unity 5.2.2f1

Discussion in 'Scripting' started by Ben-BearFish, Oct 28, 2015.

  1. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204
    I've noticed that Canvas.ForceUpdateCanvases has started to throw the ArgumentOutOfRangeException after updating to Unity 5.2.2f1. Typically receiving this exception means that an array index is out of range.

    Normally, this would be easy to track down, but when I followed the Stack Trace it seems to be an error down in the Unity engine somewhere. Also, worth noting is that Canvas.ForceUpdateCanvases is called in one of my LateUpdate methods. Not sure if Unity has changed things that would cause that error.

    Here's the print out:
     
  2. Ben-BearFish

    Ben-BearFish

    Joined:
    Sep 6, 2011
    Posts:
    1,204