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

Pages: 1 [2] 3 4
16
NGUI 3 Support / Re: Scrollable Text Area
« on: September 03, 2014, 04:24:34 AM »
This error was caused by having a call to UIScrollView/Drag in the OnValueChange in the UIScrollBar script, which had been put in place to try and keep the text in view as you type more stuff at the bottom of the clipped area of the Scrollview. The scroll bar updates and the text is written to the input, but you can't see it, so you have to keep stopping and moving the scroll bar to the bottom. As the scrollbar size matches the exact size of the text you can't move it so there is a load of space at the bottom, that you could then type into. So this means you have to stop and move the scrollbar for every line of text, which is a pretty naff user experience.

Any suggestions on a way around this ?

Thanks
KeithT

17
NGUI 3 Support / Re: Scrollable Text Area
« on: September 01, 2014, 03:57:18 AM »
Thanks, that fixed "Could not find method 'UpdateScrollbars' on UIScrollView" but the other run time errors still happen. Have run this in debug but have not been able to work out what the problem is:

Object reference not set to an instance of an object
UnityEngine.Debug:LogError(Object)
EventDelegate:Execute(List`1) (at Assets/Plugins/Internal/EventDelegate.cs:623)
UIProgressBar:set_value(Single) (at Assets/Plugins/Interaction/UIProgressBar.cs:138)
UIScrollView:UpdateScrollbars(UIProgressBar, Single, Single, Single, Single, Boolean) (at Assets/Plugins/Interaction/UIScrollView.cs:540)
UIScrollView:UpdateScrollbars(Boolean) (at Assets/Plugins/Interaction/UIScrollView.cs:504)
UIScrollView:UpdateScrollbars() (at Assets/Plugins/Interaction/UIScrollView.cs:437)
UIPanel:UpdateSelf() (at Assets/Plugins/UI/UIPanel.cs:1214)
UIPanel:LateUpdate() (at Assets/Plugins/UI/UIPanel.cs:1146)

Object reference not set to an instance of an object
UnityEngine.Debug:LogError(Object)
EventDelegate:Execute(List`1) (at Assets/Plugins/Internal/EventDelegate.cs:623)
UIScrollBar:set_barSize(Single) (at Assets/Plugins/Interaction/UIScrollBar.cs:58)
UIScrollView:UpdateScrollbars(UIProgressBar, Single, Single, Single, Single, Boolean) (at Assets/Plugins/Interaction/UIScrollView.cs:552)
UIScrollView:UpdateScrollbars(Boolean) (at Assets/Plugins/Interaction/UIScrollView.cs:504)
UIScrollView:UpdateScrollbars() (at Assets/Plugins/Interaction/UIScrollView.cs:437)
UIPanel:UpdateSelf() (at Assets/Plugins/UI/UIPanel.cs:1214)
UIPanel:LateUpdate() (at Assets/Plugins/UI/UIPanel.cs:1146)


18
NGUI 3 Support / Re: Scrollable Text Area
« on: August 29, 2014, 07:54:13 AM »
Thanks, have got this partially working but having a couple of problems.

Object reference not set to an instance of an object
UnityEngine.Debug:LogError(Object)
EventDelegate:Execute(List`1) (at Assets/Plugins/Internal/EventDelegate.cs:623)
UIProgressBar:set_value(Single) (at Assets/Plugins/Interaction/UIProgressBar.cs:138)
UIScrollView:UpdateScrollbars(UIProgressBar, Single, Single, Single, Single, Boolean) (at Assets/Plugins/Interaction/UIScrollView.cs:540)
UIScrollView:UpdateScrollbars(Boolean) (at Assets/Plugins/Interaction/UIScrollView.cs:504)
UIScrollView:UpdateScrollbars() (at Assets/Plugins/Interaction/UIScrollView.cs:437)
UIPanel:UpdateSelf() (at Assets/Plugins/UI/UIPanel.cs:1214)
UIPanel:LateUpdate() (at Assets/Plugins/UI/UIPanel.cs:1146)

Object reference not set to an instance of an object
UnityEngine.Debug:LogError(Object)
EventDelegate:Execute(List`1) (at Assets/Plugins/Internal/EventDelegate.cs:623)
UIScrollBar:set_barSize(Single) (at Assets/Plugins/Interaction/UIScrollBar.cs:58)
UIScrollView:UpdateScrollbars(UIProgressBar, Single, Single, Single, Single, Boolean) (at Assets/Plugins/Interaction/UIScrollView.cs:552)
UIScrollView:UpdateScrollbars(Boolean) (at Assets/Plugins/Interaction/UIScrollView.cs:504)
UIScrollView:UpdateScrollbars() (at Assets/Plugins/Interaction/UIScrollView.cs:437)
UIPanel:UpdateSelf() (at Assets/Plugins/UI/UIPanel.cs:1214)
UIPanel:LateUpdate() (at Assets/Plugins/UI/UIPanel.cs:1146)

and

Could not find method 'UpdateScrollbars' on UIScrollView
UnityEngine.Debug:LogError(Object, Object)
EventDelegate:Cache() (at Assets/Plugins/Internal/EventDelegate.cs:402)
EventDelegate:get_isValid() (at Assets/Plugins/Internal/EventDelegate.cs:207)
EventDelegate:IsValid(List`1) (at Assets/Plugins/Internal/EventDelegate.cs:651)
UIInput:ExecuteOnChange() (at Assets/Plugins/UI/UIInput.cs:1431)
UIInput:set_value(String) (at Assets/Plugins/UI/UIInput.cs:289)
NotesWindowHandler:OnNotesLoaded(String) (at Assets/ViewCode/Menu/NotesWindowHandler.cs:48)
Controller:communicateExternally(ExternalMessageType, String) (at Assets/ViewCode/Controller.cs:724)
NotesWindowHandler:OpenClose() (at Assets/ViewCode/Menu/NotesWindowHandler.cs:41)
EventDelegate:Execute() (at Assets/Plugins/Internal/EventDelegate.cs:473)
EventDelegate:Execute(List`1) (at Assets/Plugins/Internal/EventDelegate.cs:618)
UITweener:Update() (at Assets/Plugins/Tweening/UITweener.cs:224)

The window with the text area on it has a tween which scales and enables and disables the window and am wondering if is due to that, as it starts disabled.

Images of the set up are attached.

Thanks in advance for any insights.

19
NGUI 3 Support / Scrollable Text Area
« on: August 27, 2014, 06:49:53 AM »
Need to create text area in a window, where users can add/edit text, which has a scroll bar which scrolls as it changes size (rather than shrinks). A basic text editor.

Found a couple of references on possibilities re to do this:
http://www.tasharen.com/forum/index.php?topic=8967.0
http://answers.unity3d.com/questions/370208/ngui-text-vertical-scrollbar.html

Have also gone through the release notes to see if there is anything relevant, but wanted to check if there is a relevant update or better way ? ....before embarking on this

20
NGUI 3 Support / Re: 3.7.0 breaks 3D menus that work in 3.6.8
« on: August 25, 2014, 01:59:22 AM »
Many thanks, just tried 3.7.1 and the change re events to rigidbodies fixed this.

21
NGUI 3 Support / Re: 3.7.0 breaks 3D menus that work in 3.6.8
« on: August 22, 2014, 06:41:16 AM »
Did some more work on this:

We are using the UICamera event system and look at UICamera.lastHit to get details of what has been hit from the main camera, in a class set up as a UICamera.genericEventHandler, which handles all events not handled by NGUI. We use a different layer to differentiate 3D menu events which are handled within the NGUI hierarchy versus other events in 3D space which the genericEventHandler deals with. If UICamera is set to 3D World events the genericEventHandler gets the hit target, if it's set to 3D UI it gets garbage. So this is what breaks 3D interactions if we switch to 3D UI.

The original cause is indeed that because in 3.7.0 in 3D World mode the events are now sent to the GO with the rigidbody, all the existing event handlers we have on NGUI objects with colliders e.g. buttons, no longer get the events, which means to go to 3.7.0 we will have to redo every piece of equipment with an NGUI control interface. Can I ask what this change is for ?

As said below, we have complex 3D objects which contain NGUI control interfaces, that can be moved and therefore have a single rigidbody at the very top level of the GO hierarchy. Having another rigidbody on NGUI panels (as is forced by UIPanel if you don't comment it out) messes with the physics. Sending NGUI events to this top level GO which is outside the NGUI menu hierarchy does not seem to make much sense.




22
NGUI 3 Support / Re: 3.7.0 breaks 3D menus that work in 3.6.8
« on: August 22, 2014, 05:05:05 AM »
Oooof this is huge and breaks our stuff big time.

We have a main camera on an First Person Controller which is the main 3D view and also renders NGUI menus on 3D equipment, we have a 2nd camera which renders 2D HUD/MENU.

Switching UICamera on the FPC camera to 3D UI fixes the menus on 3D equipment not working, but we then don't get any events from interaction with 3D GOs themselves e.g. you should be able to pick things up by mouse press on a 3D object, whereas if you click on a menu on the same object the menu works.

With this new setup how are menus on 3D objects supposed to work ? It seems to be mutually exclusive, either NGUI menus or 3D objects.

23
NGUI 3 Support / 3.7.0 breaks 3D menus that work in 3.6.8
« on: August 22, 2014, 02:56:26 AM »
Two identical projects the only difference is NGUI 3.6.8 and 3.7.0.
Everything fine in 3.6.8 but 3D menus totally unresponsive in 3.7.0. (2D menus work fine)
UICamera handling the 3D interface is set to 3D World events on both versions.

I saw there was some change in 3.7.0 that events are sent to rigidbodies not colliders any more. Our equipment which does not move does have rigidbodies on their NGUI menus and they have this issue, so probably not that ? Would be interesting to have more explanation what the implications of this change are ?

Any suggestions re cause before diving into heavy debugging ?

(We also have equipment which can be moved (picked up), which also have NGUI menus and these can't have rigidbodies because 2 rigidbodies on a moving gameobject messes up the physics. (We have had to comment out the automatic creation of rigidbodies in UIPanel to get around this). Is this collider to rigidbody change going to mean these don't work any more?)

24
NGUI 3 Support / Re: UIInput's OnSelect() event problem
« on: August 20, 2014, 09:11:45 AM »
This misleading description is still written here: http://www.tasharen.com/forum/index.php?topic=6711.0

Just spent an hour working out OnSelect does not work like this description.

25
NGUI 3 Support / NGUI automatically moving dynamically cloned objects
« on: July 21, 2014, 09:39:06 AM »
We have a 3D view which has a "2D HUD" system using NGUI, and there is also a 2nd "2D Menu" which appears in front of the 3D view sometimes. This all works fine.

When dynamically cloning existing "2D Menu" objects from code on a GO in the "2D Menu" system using instantiate, something in NGUI is moving the new objects into the "2D HUD" hierarchy and also changing it's layer.

Pretty sure it's NGUI doing this, can this be turned off ? or is there a work around for it.

Thanks for any tips.

26
NGUI 3 Support / Too many vertices on one panel ?
« on: July 09, 2014, 10:30:58 AM »
We need to dynamically create 1000s of 2D sprites and display them in front of a background and then allow the user to zoom in an out and move the view around to look at bits of the result in detail.

We were using reasonable resolution for this 100 x 100 and having Unity scale so there good resolution when they zoom in, but NGUI is now complaining about "too many vertices on one panel" so I am looking for a work around.

Any suggestions re an approach, as not made much progress on the several things we have tried ?

Thanks in advance.








27
NGUI 3 Support / Re: NGUI Out of Memory
« on: February 21, 2014, 05:52:43 AM »
Hmmm have taken image size up to 100x100 and still have an error......

Too many vertices on one panel: 781992
UnityEngine.Debug:LogError(Object)
UIDrawCall:Set(BetterList`1, BetterList`1, BetterList`1, BetterList`1, BetterList`1) (at Assets/Plugins/Internal/UIDrawCall.cs:472)
UIPanel:SubmitDrawCall(UIDrawCall) (at Assets/Plugins/UI/UIPanel.cs:1062)

28
NGUI 3 Support / Re: NGUI Out of Memory
« on: February 21, 2014, 05:22:57 AM »
Did a bit more with this, the out of mem was for an png 10x10 which is tiled to full screen using anchors tied to the UIRoot.

Made the image 20x20 and then got:

Too many vertices on one panel: 24661672
UnityEngine.Debug:LogError(Object)
UIDrawCall:Set(BetterList`1, BetterList`1, BetterList`1, BetterList`1, BetterList`1) (at Assets/Plugins/Internal/UIDrawCall.cs:472)
UIPanel:SubmitDrawCall(UIDrawCall) (at Assets/Plugins/UI/UIPanel.cs:1062)
UIPanel:FillAllDrawCalls() (at Assets/Plugins/UI/UIPanel.cs:1019)
UIPanel:UpdateSelf() (at Assets/Plugins/UI/UIPanel.cs:959)
UIPanel:LateUpdate() (at Assets/Plugins/UI/UIPanel.cs:913)

So I guess it's a case of making this larger until it goes away...........

29
NGUI 3 Support / Re: NGUI Out of Memory
« on: February 21, 2014, 05:12:34 AM »
Did you find this ?

We have the same issue with 3.4.9. (Think is probably a small sprite being tiled using anchors to make a full screen background)

30
NGUI 3 Support / Scrollable table in a resizeable window 3.4.8
« on: February 11, 2014, 07:10:32 AM »
Trying to make a dragable, scrolling, resizeable table with rows full of text.
Have:
Window (UISprite)
       Resize btn (UIDrag Resize)
       Scroll View (UIScroll View)
           Table (UITable)
              Label 1 (UILabel, UIDragScrollView)
              Label 2
              Label 3

Left and right Anchors in the labels are linked to the Scroll View Left and right and labels are set to “ResizeHeight”

It sort of works but when resizing the text gets written on top of itself, as guessing probably need to call table.reposition() ? and probably at the update rate from within UIDragResize() on the resize button ?

Am I missing something, anyone got an approach to make this work ?

Pages: 1 [2] 3 4