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.


Messages - 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 / Re: NGUI Out of Memory
« on: February 17, 2014, 09:17:00 AM »
I honestly, am not sure how to go about a repo in this case. The background texture is 10 x 320 for 480 x 320 and 20 x 640 for 960 x 640 screens (multi res atlas). which shouldn't be to many polys (32 x 4 =128 triangles) That might be too small a texture and too many polys, but I'm not doing any optimization at the moment.

Initially I didn't have a problem, but as I was working on the project adding other things to the project, it just got a to a point where it wasn't happy with the background and was barking memory errors. I have since then removed the background and started a duplicate of the project which seems to ok, for the minute.

I can send you the files privately if you want to have a further look.


3
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.

4
NGUI 3 Support / Re: NGUI Reference Atlas
« on: February 05, 2014, 05:09:28 AM »
Thanks, I got it to work in the end. Differentiating between "Assets" and "Resources" without explicitly saying say so can be a bit confusing to the uninitiated.


5
NGUI 3 Support / Re: NGUI Reference Atlas
« on: January 31, 2014, 11:34:38 AM »
The reference Atlas in the same folder as the other Atlases (Atlesi??) which is in the Assets folder.

I might need to be walked through this with a tutorial as I've lost nearly two days on this and am getting nowhere fast.

6
NGUI 3 Support / Re: NGUI Reference Atlas
« on: January 31, 2014, 11:19:57 AM »
... which brings us back to square 1. Null Reference Exception.  >:(


7
NGUI 3 Support / Re: NGUI Reference Atlas
« on: January 31, 2014, 09:44:30 AM »
In your video you already have the reference atlas in the scene. (Which kind of defeats the purpose of explaining how to use to use them if you don't know how to create a prefab reference atlas)

So, since the atlases are already in the projects folder, how do you make a prefab (reference) atlas then?
Simply duplicating an existing atlas and then changing the Atlas Type to reference doesn't seem to work. As soon as you click back on the newly duplicated atlas, it's Atlas Type reverts back to Normal instead of Reference. Frustrating! :o

8
NGUI 3 Support / Re: Corrupt Texture atlas
« on: January 31, 2014, 07:28:30 AM »
Thanks for getting back to me.

Obviously I can tile the background image to something much slimmer.   ;)

Just out of interest, is there an option with UITexture to tile the texture?? Say for example you had a large texture (when substituting for a slice or smaller texture wasn't an option) and you wanted to tile it.

9
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??

10
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]