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 - Antitribu

Pages: [1]
1
NGUI 3 Support / Re: UIDraggableCamera lifecycle (wrong?)
« on: June 26, 2014, 10:42:59 AM »
I'm making a scrollable map, and, for now, I find a "ScrollView via secondary camera" approach more suitable for my needs - so I'm making use of UIDraggableCamera+UIViewPort.

As for why I'm not using a plain clipped scroll view: the component ("Map") that's rendered in the viewport, could potentially contain 3D objects in perspective.

2
NGUI 3 Support / UIDraggableCamera lifecycle (wrong?)
« on: June 24, 2014, 09:42:21 AM »
Hey-yo, forum.
I'm using NGUI 3.6.1, and have stumbled upon a little problem.

Most of my GUI is constructed on-the-fly, using premade prefabs and dynamic instantiation (using AddComponent).

Yet, UIDraggableCamera effectively forbids such behaviour, by making a check for rootForBounds inside Awake:

  1.         void Awake ()
  2.         {
  3.                 mCam = camera;
  4.                 mTrans = transform;
  5.  
  6.                 if (rootForBounds == null)
  7.                 {
  8.                         Debug.LogError(NGUITools.GetHierarchy(gameObject) + " needs the 'Root For Bounds' parameter to be set", this);
  9.                         enabled = false;
  10.                 }
  11.         }
  12.  

making dynamic instantiation such as the one below throw an error:

  1. UIDraggableCamera draggableCamera = DraggableCamera.AddComponent<UIDraggableCamera>();
  2. draggableCamera.rootForBounds = SomeOtherGOInstance.transform;
  3. draggableCamera.dragEffect = UIDragObject.DragEffect.None;
  4.  

so, i need an explicit .enable call to make things right (it won't remove the LogError, ofc).
  1. draggableCamera.enabled = true;
  2.  

The question is: why would UIDraggableCamera need such a check inside Awake?
Judging by the implementation, the only unchecked call to rootForBounds is inside Update.

... So moving the check to Start would fix things?

P.S. I've checked the forum for similar threads, and found and old one, http://www.tasharen.com/forum/index.php?topic=1144.msg5896 , that doesn't have any point.

3
The newest UIWrapContent seems like a perfect candidate to implement a mainstream scroll view logic — capable of presenting the (possibly) infinite list of uniform items from a data source, yet consuming the absolute minimum of memory (only rendering what's on-screen).

Yet, the only method it presents for such implementation, is 'UpdateItem'. IMHO, another standard method would fit in to complete the concept I am speaking about: 'GetCount' (to specify the end exact number of items to be presented).

Is such a thing planned to include into the UIWrapContent interface, or is it left up to be implemented by hand when needed?

4
Hey people o/

Me and my team have recently started migrating one of our projects from iOS to Android... and have stumbled upon a nasty problem. All the textures appear black when application run on Android.

Project was optimized for iPad2 and iPad3 (iOS6) and is running just OK. However, when we changed the deployment target to Android and tried to test APK on a Nexus 7 (Android 4.2.2) the black screen appeared instead of the main menu. After testing a few things (creating a simple label via OnGUI, etc), we have concluded that atlases for NGUI are appearing black.

Anyone had this problem, perchance?  ;) Some possible causes?

Atlas textures are in RGBA32.

5
NGUI 3 Support / Re: Using web-bases images with NGUI
« on: November 08, 2012, 04:51:44 AM »
Oh, missed this class ref. Thanks.

6
NGUI 3 Support / Using web-bases images with NGUI
« on: November 08, 2012, 04:40:28 AM »
Hey-ho o/

I want to use web-based images with NGUI - images for a gallery are stored on a server.
Is it possible to implement the GUI for such a gallery with NGUI?

I am kind of confused, as I cannot (or do not know how) generate an atlas at runtime.

Pages: [1]