Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - ghoulfool

Pages: [1]
1
NGUI 3 Support / Unity alters atlas on build
« on: March 03, 2014, 10:42:53 AM »
I've just done an iOS build and suddenly the majority of textures have been messed around with. To explain:, it's like the atlas has been modified and all the references to the textures/sprites have not been updated, so the whole project looks a mess. I suspect that this may have been caused by using too large textures (2048 x 2048?) ,causing Unity to shrink or modify the textures/atlases in the scene

Firstly, Is this an NGUI or Unity thing (or a combination of both)?
Secondly is there a way to prevent it happening again? - Use smaller textures!
Thirdly, I've got a back up of the project but is there a quick and simple "undo" if this were to happen again?

Thanks

2
NGUI 3 Support / NGUI Out of Memory
« on: February 14, 2014, 09:29:07 AM »
Hi! I was working on a Unity scene last night and when I booted up the scene this morning I get an OutOfMemoryException error:

  1. OutOfMemoryException: Out of memory
  2. BetterList`1[UnityEngine.Vector3].AllocateMore () (at Assets/NGUI/Scripts/Internal/BetterList.cs:165)
  3. BetterList`1[UnityEngine.Vector3].Add (Vector3 item) (at Assets/NGUI/Scripts/Internal/BetterList.cs:207)
  4. UISprite.TiledFill (.BetterList`1 verts, .BetterList`1 uvs, .BetterList`1 cols) (at Assets/NGUI/Scripts/UI/UISprite.cs:731)
  5. UISprite.OnFill (.BetterList`1 verts, .BetterList`1 uvs, .BetterList`1 cols) (at Assets/NGUI/Scripts/UI/UISprite.cs:514)
  6. UIWidget.UpdateGeometry (Int32 frame) (at Assets/NGUI/Scripts/Internal/UIWidget.cs:1323)
  7. UIPanel.UpdateWidgets () (at Assets/NGUI/Scripts/UI/UIPanel.cs:1276)
  8. UIPanel.UpdateSelf () (at Assets/NGUI/Scripts/UI/UIPanel.cs:948)
  9. UIPanel.LateUpdate () (at Assets/NGUI/Scripts/UI/UIPanel.cs:907)
  10.  

The scene was fine previously and I've not added any new objects or textures so am a little confused as to what could have caused this.   :o
I suspect be a tiled sprite with UIStretch attached. As deleting that turns the scene from wireframe to textured. Any general pointers to clean up this mess? Thanks.

3
NGUI 3 Support / NGUI Reference Atlas
« on: January 30, 2014, 10:44:11 AM »
I've been following the video about NGUI: Reference Atlas http://www.youtube.com/watch?v=dbwgP6PC4go

I've emulated the scene as far as I can see using the following LoadAtlas script

  1. using UnityEngine;
  2.  
  3. public class LoadAtlas : MonoBehaviour
  4. {
  5.    public UIAtlas referenceAtlas;
  6.    public string sdAtlas = "SD";
  7.    public string hdAtlas = "HD";
  8.    public bool loadHD = true;
  9.  
  10.    void Awake ()
  11.    {
  12.       GameObject go = Resources.Load(loadHD ? hdAtlas : sdAtlas, typeof(GameObject)) as GameObject;
  13.       referenceAtlas.replacement = go.GetComponent<UIAtlas>();
  14.    }
  15. }
  16.  


However the script is barfing  at the last line.

  • Null Reference Exception: Object reference not set to an instance of LoadAtlas.Awake() (at Assets/classes/LoadAtlas.cs:13)
I can't think what it can be referring to. I've linked the script to the UI root and the Reference Atlas vaiable in said script to refAtlas - which is my reference atlas
Any ideas??

4
NGUI 3 Support / Corrupt Texture atlas
« on: January 30, 2014, 06:07:28 AM »
Hi! I've started using NGUI and all was going well until I managed to corrupt the texture atlas somehow. (No textures appeared in scene, save one which was just noise) I suspect I reached the Unity limit for iOS. Anyhoo, I managed to reconstruct the scene and the atlas. However I'm having similar problems. See piccy I've included a screen shot (The left have is how I see it in Unity, the right is on the iPhone 5) The texture in question is 1024x576 on an atlas by itself as 2048 x 2048
Any ideas how to resolve this? Thank you.

Pages: [1]