Author Topic: StackOverflowException 3.07 UIRect  (Read 4078 times)

LennDolling

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
StackOverflowException 3.07 UIRect
« on: December 13, 2013, 10:15:24 PM »
3.0.7 f3

I created a sprite to use as a mask for a flashlight....  and I am needing to have the sprite move infront of the gameworld as I touch the screen to mask the world....  but in doing so when I update the transform sprite during runtime to any position besides 0,0,0 the values get out of wack...

in trying to perhaps put the sprite on a panel first and then manipulate the transform from the panel has created a stack overflow....

Panel--
        -Sprite

I dragged the sprite object onto the panel... and poOf


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: StackOverflowException 3.07 UIRect
« Reply #1 on: December 14, 2013, 03:56:09 AM »
Curious. You're ending up with a cyclic dependency here. I'd be curious to know how I can go about reproducing it on my end. I'd also be curious to know if changing UIRect.OnValidate function to the following would fix it:
  1.         protected virtual void OnValidate()
  2.         {
  3.                 OnDisable();
  4.                 ResetAnchors();
  5.                 Invalidate(true);
  6.                 OnEnable();
  7.         }

LennDolling

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: StackOverflowException 3.07 UIRect
« Reply #2 on: December 14, 2013, 05:29:52 PM »
I will change it on my end and see if it goes away...  sweet fast response....  since the issue with getting the sprite to move during a game event was not happening I decided to just make a simple plane and write a script to go infront of the camera seemed to make a nice flashlight proof of concept first try at it....*cough second....

I will update ...  I am not sure if the method I am doing is the most effective method..

first preview video of the game I am putting together

youtube video of ngui + 2dtoolkit + smoothmoves + 2dColliderGen
http://www.youtube.com/watch?v=dvUCpCm1Qa4

Update:  just added code and did a test...

http://youtu.be/aOblLCECMls

video shows the issue....

could be how I created the sprite object as just to a base of the camera... then dragged it to the panel...

in the second run after deleting the code and removing the panel...  all the atlas's turned to the pink...  as I remember a long time ago.... I just saved everything and restarted unity and things where back to normal.

« Last Edit: December 14, 2013, 06:47:03 PM by LennDolling »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: StackOverflowException 3.07 UIRect
« Reply #3 on: December 14, 2013, 07:22:27 PM »
Well, I added code that exits out early in the latest Pro version, so the issue will be gone on its own.

LennDolling

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 3
    • View Profile
Re: StackOverflowException 3.07 UIRect
« Reply #4 on: December 16, 2013, 12:29:41 PM »
excellent. bravo on your support speed.  ;)