Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: rganeyev on October 09, 2013, 10:17:59 AM

Title: NGUIEditorTools.FindAll is not found on 3.0.2
Post by: rganeyev on October 09, 2013, 10:17:59 AM
I imported an upgrade from 2.7.0 to 3.0.2
Everything was ok, except UpgradeWidgets script. It claims that there's no method NGUIEditorTools.FindAll<T>. It seems that I have broken NGUIEditorTools script?

  1. List<UISlicedSprite> sliced = NGUIEditorTools.FindAll<UISlicedSprite>();
  2.  
It's only thing that doesn't compile, so I added code like this:
  1. //NGUIEditorTools.cs
  2. public static List<T> FindAll<T>() where T : MonoBehaviour
  3.     {
  4.         var objs = Object.FindObjectsOfType(typeof (T));
  5.         return objs.Cast<T>().ToList();
  6.     }
  7.  

Can anybody share me NGUIEditorTools, please?
Title: Re: NGUIEditorTools.FindAll is not found on 3.0.2
Post by: ArenMook on October 09, 2013, 01:31:18 PM
It's on line 649 of NGUIEditorTools.cs. It's also present in NGUITools.