Welcome,
Guest
. Please
login
or
register
.
May 13, 2026, 02:25:09 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
WP8 UIButtonScale cause exception on OnHover
« previous
next »
Print
Pages: [
1
]
Author
Topic: WP8 UIButtonScale cause exception on OnHover (Read 4373 times)
Lotti
Newbie
Thank You
-Given: 5
-Receive: 0
Posts: 47
WP8 UIButtonScale cause exception on OnHover
«
on:
July 09, 2014, 11:42:21 AM »
latest unity (4.5.1) with latest ngui (3.6.7)
System.
Runtime
.
InteropServices
.
SEHException
:
External component has trown an exception
.
at
UnityEngine
.
Internal
.
$Call
.
Invoke39
(
Int32 arg0, IntPtr method
)
at UnityEngine
.
Component
.
InternalGetGameObject
(
)
at UIButtonScale
.
OnHover
(
Boolean isOver
)
I think it is (as usual) a problem unity side. Do you think there is the possibility to fix this one?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: WP8 UIButtonScale cause exception on OnHover
«
Reply #1 on:
July 09, 2014, 03:39:34 PM »
Do you have stripping turned on?
OnHover function is:
void
OnHover
(
bool
isOver
)
{
if
(
enabled
)
{
if
(
!
mStarted
)
Start
(
)
;
TweenScale
.
Begin
(
tweenTarget
.
gameObject
, duration, isOver
?
Vector3
.
Scale
(
mScale, hover
)
:
mScale
)
.
method
=
UITweener
.
Method
.
EaseInOut
;
}
}
Since the error message mentions InternalGetGameObject, I assume it's trying to do the "tweenTarget.gameObject". Is 'tweenTarget' null?
Logged
Lotti
Newbie
Thank You
-Given: 5
-Receive: 0
Posts: 47
Re: WP8 UIButtonScale cause exception on OnHover
«
Reply #2 on:
July 10, 2014, 03:44:44 AM »
No stripping is off, but we are using .net 2.0 subset.
Target may be null or not. Depends on how much i paid attention while developing the gui. However it seems to me that uibuttonscale works fine also with null target.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: WP8 UIButtonScale cause exception on OnHover
«
Reply #3 on:
July 10, 2014, 08:59:38 PM »
It sets the target itself if it's null, as I recall. But if it's called before it's set, it can still be null. Either set it, or add a null check for that.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
WP8 UIButtonScale cause exception on OnHover