I encountered this problem is, in start () directly using the WWW value local image, may be loading the picture is relatively time-consuming, this error occurred.
The solution is to use the co-process:
Use the This for Initializationvoid Start () {addsampledata ();} void Addsampledata () {Startcoroutine (Waitloadimage ("/users/xxxx/xxx/xxx.jpg", Go);} IEnumerator waitloadimage (String fileName, Gameobject targetgameobject) {Recttransform Recttransform = Targetgameobject.getcomponent<recttransform> (); www www=new www ("file://" +filename); Image img = targetgameobject.getcomponent<image> ();D ebug. Log (www.url); yield return www; Rect spriterect = new Rect (0, 0, www.texture.width, www.texture.height); Sprite imagesprite = sprite.create (Www.texture, Spriterect, New Vector2 (0.5f, 0.5f)); img.sprite = Imagesprite;}
Invalid AABB Inaabb UnityEngine.Canvas:SendWillRenderCanvases () solution