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

Pages: [1]
Hi guys,

I am creating a small Menu and I am adding small children into body of the menu using a ScrollView and a UITable:

However as you can see my alignment is off. I would like to be able to have all the child widgets aligned to the left hand side and not centered like they are.

I have tried using both a UIGrid and UITable for this, and for some reason unable to see a option which can help me get this to look how I want.

Can someone please show me where I am going wrong?.. Thanks :)


I am trying to create a prefab which has a number of collision boxes on it so I can have a user interact with this prefab in different ways.

As you can see from the image I have a large collision box covering more than the size of the prefab which I have hooked up to a method which is called when OnHover is true over this area.
This collision box for the OnHover, is part of the parent of the prefab and has been set behind the children of the prefab in the Z axis. (20 pixels behind the rest of the collision boxes).

My problem is that the method which is meant to be called when the OnDrag collision boxes is set to true (when the user clicks and drags from these areas), not longer gets called.
I understand that the bigger collision box must be blocking the interaction with the Drag collision boxes.

If someone could let me know how I can control my collisions boxes better I would be extremely happy.

Thanks for your time.

Hi guys,

I've had a look at the documentation and other forum posts and I was shocked to see that I can not find a answer to what I thought was a simple question.

I'm looking to have full control over a Tween's animation, for example the Tween Position Component.

As it stands at the moment I am able to attach a Tween Position Component to a GameObject and when I press play in Unity the Tween animation starts automatically.
I understand I can use UIPlayTween to have some control over playing the tween again. However my main issue is that I do not want the Tween to start automatically.

So the question is, am I able to have control over when a Tween's animation plays for the first time?

If I have missed something really simple I do apologise, but can someone point me the correct direction please? :)

Thanks a lot.

NGUI 3 Support / Unity crashing when using a NGUI scroll bar.
« on: January 07, 2014, 04:52:31 PM »
Hi guys,

I have ran into a problem where Unity will crash when I am trying to use my scroll bar in the game view.

In my scene I have a Scroll Bar which is attached to a ScrollView via the UIDraggable Panel component.
If I drag my mouse on the ScrollView, everything works as expected and the Scroll Bar moves normally as well. However as soon as I click on the Scroll Bar itself, the Unity program completely crashes to desktop.

Is this a common issue people have ran into before?

Please see the stacktrace below:

  1. (0x0BC210C6) c:\buildagent\work\de0bdf8cacffc05\eglib\src\goutput.c (159 + 0x2): g_logv + 0x6f
  2. (0x0BC210E7) c:\buildagent\work\de0bdf8cacffc05\eglib\src\goutput.c (169 + 0x12): g_log + 0x15
  3. (0x0BD2796B) c:\buildagent\work\de0bdf8cacffc05\mono\metadata\generic-sharing.c (402 + 0x1b): rgctx_template_set_other_slot + 0xe5
  4. (0x0BD280B2) c:\buildagent\work\de0bdf8cacffc05\mono\metadata\generic-sharing.c (849 + 0x0): fill_in_rgctx_template_slot + 0x53
  5. (0x0BD28185) c:\buildagent\work\de0bdf8cacffc05\mono\metadata\generic-sharing.c (866 + 0x0): fill_in_rgctx_template_slot + 0x126
  6. (0x0BD28185) c:\buildagent\work\de0bdf8cacffc05\mono\metadata\generic-sharing.c (866 + 0x0): fill_in_rgctx_template_slot + 0x126
  7. (0x0BD28185) c:\buildagent\work\de0bdf8cacffc05\mono\metadata\generic-sharing.c (866 + 0x0): fill_in_rgctx_template_slot + 0x126
  8. (0x0BD28185) c:\buildagent\work\de0bdf8cacffc05\mono\metadata\generic-sharing.c (866 + 0x0): fill_in_rgctx_template_slot + 0x126
  9. (0x0BD28185) c:\buildagent\work\de0bdf8cacffc05\mono\metadata\generic-sharing.c (866 + 0x0): fill_in_rgctx_template_slot + 0x126
  10. (0x0BD28185) c:\buildagent\work\de0bdf8cacffc05\mono\metadata\generic-sharing.c (866 + 0x0): fill_in_rgctx_template_slot + 0x126
  11. (0x0BD28185) c:\buildagent\work\de0bdf8cacffc05\mono\metadata\generic-sharing.c (866 + 0x0): fill_in_rgctx_template_slot + 0x126
  12. (0x0BD28228) c:\buildagent\work\de0bdf8cacffc05\mono\metadata\generic-sharing.c (912 + 0x12): register_other_info + 0x8e
  13. (0x0BD2835D) c:\buildagent\work\de0bdf8cacffc05\mono\metadata\generic-sharing.c (977 + 0xf): lookup_or_register_other_info + 0xce
  14. (0x0BD28444) c:\buildagent\work\de0bdf8cacffc05\mono\metadata\generic-sharing.c (1020 + 0x12): mono_method_lookup_or_register_other_info + 0x8e
  15. (0x0BD0C664) c:\buildagent\work\de0bdf8cacffc05\mono\mini\mini.c (2816 + 0x1b): mono_resolve_patch_target + 0x4c6
  16. (0x0BD24F08) c:\buildagent\work\de0bdf8cacffc05\mono\mini\mini-x86.c (4428 + 0x0): mono_arch_patch_code + 0x3b
  17. (0x0BD0E162) c:\buildagent\work\de0bdf8cacffc05\mono\mini\mini.c (3249 + 0x0): mono_codegen + 0x2c8
  18. (0x0BD0ED16) c:\buildagent\work\de0bdf8cacffc05\mono\mini\mini.c (3992 + 0x0): mini_method_compile + 0xb4a
  19. (0x0BD0F4DE) c:\buildagent\work\de0bdf8cacffc05\mono\mini\mini.c (4318 + 0x10): mono_jit_compile_method_inner + 0x1d8
  20. (0x0BD0FA3B) c:\buildagent\work\de0bdf8cacffc05\mono\mini\mini.c (4530 + 0xf): mono_jit_compile_method_with_opt + 0x134
  21. (0x0BD0FAA8) c:\buildagent\work\de0bdf8cacffc05\mono\mini\mini.c (4555 + 0x12): mono_jit_compile_method + 0x1b
  22. (0x0BD0976A) c:\buildagent\work\de0bdf8cacffc05\mono\mini\mini-trampolines.c (477 + 0x6): mono_magic_trampoline + 0x580
  23. (0x0C070066) ((module-name not available)): (filename not available): (function-name not available) + 0x0
  24. (0x1ED0D322) (Mono JIT code): (filename not available):  UIScrollBar:OnPressForeground (UnityEngine.GameObject,bool) + 0x8a (1ED0D298 1ED0D42C) [0BEF6BD0 - Unity Child Domain] + 0x0
  25. (0x1ED0D27B) (Mono JIT code): (filename not available):  UIEventListener:OnPress (bool) + 0x5b (1ED0D220 1ED0D292) [0BEF6BD0 - Unity Child Domain] + 0x0
  26. (0x1ED05FC8) (Mono JIT code): (filename not available):  (wrapper runtime-invoke) <Module>:runtime_invoke_void__this___sbyte (object,intptr,intptr,intptr) + 0x98 (1ED05F30 1ED06093) [0BEF6BD0 - Unity Child Domain] + 0x0
  27. (0x0BD0FCF6) c:\buildagent\work\de0bdf8cacffc05\mono\mini\mini.c (4889 + 0xc): mono_jit_runtime_invoke + 0x214
  28. (0x0BC7D603) c:\buildagent\work\de0bdf8cacffc05\mono\metadata\object.c (2618 + 0x10): mono_runtime_invoke + 0x51
  29. (0x0081EAD5) c:\buildagent\work\cac08d8a5e25d4cb\runtime\mono\monoutility.h (499 + 0x10): mono_runtime_invoke_profiled + 0x95
  30. (0x00820C89) c:\buildagent\work\cac08d8a5e25d4cb\runtime\mono\monobehaviour.cpp (927 + 0x16): MonoBehaviour::InvokeMethodOrCoroutineChecked + 0x159
  31. (0x00820FA9) c:\buildagent\work\cac08d8a5e25d4cb\runtime\mono\monobehaviour.cpp (955 + 0x0): MonoBehaviour::InvokeMethodOrCoroutineChecked + 0x99
  32. (0x0083865F) c:\buildagent\work\cac08d8a5e25d4cb\runtime\scripting\scriptingutility.cpp (922 + 0x0): SendMonoMessage + 0xbf
  33. (0x008386E8) c:\buildagent\work\cac08d8a5e25d4cb\runtime\scripting\scriptingutility.cpp (954 + 0x1a): SendMonoMessage + 0x48
  34. (0x00ABE4C1) c:\buildagent\work\cac08d8a5e25d4cb\runtime\exportgenerated\editor\unityenginegameobject.cpp (365 + 0x2e): GameObject_CUSTOM_SendMessage + 0x71
  35. (0x1ED05E70) (Mono JIT code): (filename not available):  (wrapper managed-to-native) UnityEngine.GameObject:SendMessage (string,object,UnityEngine.SendMessageOptions) + 0x90 (1ED05DE0 1ED05EC0) [0BEF6BD0 - Unity Child Domain] + 0x0
  36. (0x1ECBD72D) (Mono JIT code): (filename not available):  UICamera:Notify (UnityEngine.GameObject,string,object) + 0x5d (1ECBD6D0 1ECBD7C7) [0BEF6BD0 - Unity Child Domain] + 0x0
  37. (0x1DD3F640) (Mono JIT code): (filename not available):  UICamera:ProcessTouch (bool,bool) + 0x378 (1DD3F2C8 1DD40149) [0BEF6BD0 - Unity Child Domain] + 0x0
  38. (0x1DD3EF04) (Mono JIT code): (filename not available):  UICamera:ProcessMouse () + 0xa9c (1DD3E468 1DD3F0E3) [0BEF6BD0 - Unity Child Domain] + 0x0
  39. (0x1DD3DEAD) (Mono JIT code): (filename not available):  UICamera:Update () + 0xbd (1DD3DDF0 1DD3E3E0) [0BEF6BD0 - Unity Child Domain] + 0x0
  40. (0x177CBE1F) (Mono JIT code): (filename not available):  (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr) + 0x8f (177CBD90 177CBEEA) [0BEF6BD0 - Unity Child Domain] + 0x0
  41. (0x0BD0FCF6) c:\buildagent\work\de0bdf8cacffc05\mono\mini\mini.c (4889 + 0xc): mono_jit_runtime_invoke + 0x214
  42. (0x0BC7D603) c:\buildagent\work\de0bdf8cacffc05\mono\metadata\object.c (2618 + 0x10): mono_runtime_invoke + 0x51
  43. (0x00835828) c:\buildagent\work\cac08d8a5e25d4cb\runtime\scripting\backend\mono\scriptingbackendapi_mono.cpp (176 + 0x1a): scripting_method_invoke + 0xb8
  44. (0x0083541A) c:\buildagent\work\cac08d8a5e25d4cb\runtime\scripting\backend\scriptinginvocationnoargs.cpp (94 + 0x15): ScriptingInvocationNoArgs::Invoke + 0x6a
  45. (0x00834DF5) c:\buildagent\work\cac08d8a5e25d4cb\runtime\scripting\backend\scriptinginvocation.cpp (94 + 0x0): ScriptingInvocation::Invoke + 0x15
  46. (0x0082177C) c:\buildagent\work\cac08d8a5e25d4cb\runtime\mono\monobehaviour.cpp (533 + 0xb): MonoBehaviour::CallMethodIfAvailable + 0xcc
  47. (0x00821AA9) c:\buildagent\work\cac08d8a5e25d4cb\runtime\mono\monobehaviour.cpp (615 + 0xb): MonoBehaviour::CallUpdateMethod + 0xf9
  48. (0x00821AC7) c:\buildagent\work\cac08d8a5e25d4cb\runtime\mono\monobehaviour.cpp (621 + 0x0): MonoBehaviour::Update + 0x7
  49. (0x007B56D2) c:\buildagent\work\cac08d8a5e25d4cb\runtime\misc\player.cpp (1854 + 0x0): PlayerLoop + 0x492
  50. (0x00E12466) c:\buildagent\work\cac08d8a5e25d4cb\editor\src\application.cpp (2236 + 0xb): Application::UpdateScene + 0x216
  51. (0x00E16147) c:\buildagent\work\cac08d8a5e25d4cb\editor\src\application.cpp (2163 + 0x0): Application::UpdateSceneIfNeeded + 0x37
  52. (0x00EA2D62) c:\buildagent\work\cac08d8a5e25d4cb\editor\platform\windows\wineditormain.cpp (336 + 0x0): MainMessageLoop + 0x1c2
  53. (0x00EA3C6C) c:\buildagent\work\cac08d8a5e25d4cb\editor\platform\windows\wineditormain.cpp (851 + 0x0): WinMain + 0xdfc
  54. (0x00FB1E7F) f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c (275 + 0x1c): __tmainCRTStartup + 0x11a
  55. (0x76B7336A) (kernel32): (filename not available): BaseThreadInitThunk + 0x12
  56. (0x77D49F72) (ntdll): (filename not available): RtlInitializeExceptionChain + 0x63
  57. (0x77D49F45) (ntdll): (filename not available): RtlInitializeExceptionChain + 0x36

Thanks :)

NGUI 3 Support / How do I procedurally add widgets to a scroll view?
« on: January 06, 2014, 05:48:18 PM »

I am trying to procedurally add widgets (via NGUITools.AddChild adding the button prefabs to the grid) to a scroll view, however currently I am adding them in run-time and the are appearing 10 times bigger than they should within my scene.

My Scroll View panel is within the purple box you can see in the scene view above.

Does anyone know of anything I could be doing wrong?

Thanks for your time,

NGUI 3 Support / UIPanels (menus) rendering issues.
« on: December 23, 2013, 04:51:05 PM »
Hi all, thanks for taking the time to look at my issue.

This is kind of a 2 part question. As I been having some issues with my UIPanles not rendering correctly in the 'Game' window within Unity after pressing play.

So every time a menu (UIPanel and NGUI widgets as children) is created within my project I add these to a stack so I can loop over and update the depths and position of these menus in run time.

Issue (1):
For some reason I am having to move my menus by 120 in the Z axis. (Just confirming: this is 120 pixels away from the camera).
If they are closer to the camera than the number above, they will not render within the 'Game' window within Unity.

Issue (2):
During run time, when I create a new menu I again loop over both menus and change the position so both menus can be seen/rendered within the 'Game' window.
My problem is that when I create a second menu the menus seem to transform to 43200 in the Z axis.

Here is the code which changes the menus position in the Z axis:
  1. // Get the current menus position
  2. Vector3 position = newMenu.gameObject.transform.position;
  3. // Create the menus new position by changing the Z axis, when this.__offset = 120
  4. Vector3 newPosition = new Vector3(position.x, position.y, this.__offset);
  5. // Apply the the menus new position
  6. newMenu.gameObject.transform.position = newPosition;

Here is a screen shot of the Debug.Logs showing the newMenu.gameObject.transform.position after I have set it. So it seems that something is moving my UIPanels after I have set it where I want it to be.

I would really appreciate any feedback to do with either or both of these issues if anyone has run across them, or something similar, before and know of a mistake that I might me doing or a solution to fix these issues.

Thanks for your time, and Merry Christmas to all :)

NGUI 3 Support / Controlling UIPanels sizes
« on: December 06, 2013, 01:35:27 PM »
Hello all,

The project I am currently working on requires a lot of menus to be created via code and I would like to see if I am able to re-size my menus when I create them.

Currently I have a UI hierarchy that looks like this:

I am able to now parent any menu I create to a anchor, so I pick where it spawns.

However currently when the menus are being created they all seem to be being re-sized to the same size, not matter how big the original prefab is.
I am wondering if I have missed something or if I can control the size of a menu when it is created.
I would prefer if I can control the size via code and not have to do it manually, however any answer is appreciated.

Thanks a bunch,
Erbacher :)

Pages: [1]