Author Topic: Scrollview issue on startup  (Read 5153 times)

pad406

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 62
    • View Profile
Scrollview issue on startup
« on: February 01, 2014, 05:24:27 AM »
I'm having an issue with scrollviews. When it first starts the first few objects are the incorrect size and misaligned. If you scroll back and forward they then revert to the correct size. This is happening on the example scene, Example 7 Scroll View (Panel) also. I have attached a screen shot to explain easier.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scrollview issue on startup
« Reply #1 on: February 01, 2014, 01:23:27 PM »
How did that happen? Can you give me steps to reproduce that?

pad406

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 62
    • View Profile
Re: Scrollview issue on startup
« Reply #2 on: February 01, 2014, 02:29:40 PM »
Literally just created a new project, imported the NGUI package and went to the example scene. It nearly always happens the first time you open the project. If you run it, stop and then run again, its usually ok. However, if you select some of the sprites and/or labels (you don't have to do anything with them, just select them) it'll go wrong again. If you run it and scroll all the way to the end and then back it usually solves itself, though you may have to do it a few times. It's not just on the PC either, I built it and loaded onto my android pad, same result.

BTW great product
« Last Edit: February 01, 2014, 02:56:52 PM by pad406 »

pad406

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 62
    • View Profile
Re: Scrollview issue on startup
« Reply #3 on: February 01, 2014, 06:23:58 PM »
OK, been  having a play trying to figure out whats going on. In the example scene, if you disable the scroll bar totally, ie a the transform level, the problem disappears. However, in my own project I wasn't using a scroll bar and still had the problem. I had to create one, assign it to the Scroll bar on the UIScrollView script and then disable it the UIPanel script on the scroll bar itself and it works. So seems to be something related to scroll bars but I'm so new to this I'm lost as to what it might be. Anyways let me know, at least I have a workaround for this one now.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scrollview issue on startup
« Reply #4 on: February 01, 2014, 06:58:36 PM »
I don't get this issue either with Unity 3.5.7 or 4.3.3 (Win 8.1). And you're the first one to mention it, so I assume neither are others. Can you think of anything else that's different about your setup?

pad406

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 62
    • View Profile
Re: Scrollview issue on startup
« Reply #5 on: February 02, 2014, 05:04:30 AM »
Me!!! Seriously though, can't think of anything. Running Unity 4.3.3f1 on windows 7. I have a 2nd machine, so Ill try it on that later and let you know

pad406

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 62
    • View Profile
Re: Scrollview issue on startup
« Reply #6 on: February 02, 2014, 07:48:04 AM »
Just tried it on my MacBook and exact same issue. Even down to turning off the scroll bar solving the issue

pad406

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 62
    • View Profile
Re: Scrollview issue on startup
« Reply #7 on: February 03, 2014, 07:16:44 AM »
Hi Aren

Ever find anything on this? Now my previously working scroll view has started acting up again. Same issue and all I did was resize the sprites in it. Very confusing.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scrollview issue on startup
« Reply #8 on: February 04, 2014, 02:18:20 AM »
Nope, as I said I can't reproduce it, and no one else seems to be running into this. What version of NGUI are you using?

pad406

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 62
    • View Profile
Re: Scrollview issue on startup
« Reply #9 on: February 04, 2014, 03:14:21 AM »
3.0.9f7, only downloaded last Friday.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scrollview issue on startup
« Reply #10 on: February 04, 2014, 03:48:06 AM »
Can you try it with the latest?

pad406

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 62
    • View Profile
Re: Scrollview issue on startup
« Reply #11 on: February 04, 2014, 04:02:01 AM »
Same result I'm afraid, brand new project.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Scrollview issue on startup
« Reply #12 on: February 04, 2014, 04:11:59 AM »
Random thought, but... is your game window hidden behind your scene view?

pad406

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 62
    • View Profile
Re: Scrollview issue on startup
« Reply #13 on: February 04, 2014, 04:38:39 AM »
This is getting bizzare. On the PC it only happens if I run the game with maximize on Play set. However, I did a build and ran it on my Android tab and it goes wrong (have previously tried on my iPhone and wrong also).

pad406

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 62
    • View Profile
Re: Scrollview issue on startup
« Reply #14 on: February 04, 2014, 07:28:46 AM »
Hi Aren

Just to let you know (relates to my other post on the popup menu) that I am now starting the app with the scroll view hidden and after 1/10 sec I activate it. Works perfectly like this, so I'm not stuck, but I'd love to know what's happening.