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

Pages: 1 [2] 3
16
Okay, thanks for confirming.  I was trying to be lazy about it, but I guess I'll have to keep some references in the code to refer to after all.   :P

17
Hi again,

Is there a way to do a "GetValue" or similar sort of read on a Tweener, to return its TO (or FROM) object value that it has got stored in its DOTween Pro component in the inspector?  What I'd really like to be able to do is to grab the value from one tween - which can vary based on some logic in my code - and then put it into a different tween using ChangeStartValue or ChangeEndValue, to get some conditional chaining working.

Is there a way to do this now?  If not, would it be possible to add something like that? 

Cheers,
Shannon

18
DOTween & DOTween Pro / Re: Problem on iOS builds since 0.9.255
« on: May 18, 2015, 06:35:35 PM »
Great, thanks for the fast turnaround.  I've done a fresh build and can confirm it is working again.

19
DOTween & DOTween Pro / Problem on iOS builds since 0.9.255
« on: May 18, 2015, 05:10:02 PM »
Hi again,

I have been upgrading with the versions of DOTween Pro in the members area and these were running fine in the editor over the last few weeks.  However, today I did a build to the phone and discovered that my menu bars (using the Move tween on UGUI panels) are now only tweening in half way and then stopping. 

I went back to 0.9.225 and built again and confirmed that it still works properly on the phone on that version.  But anything from 0.9.255 or greater (and yes, I did the "select all game objects" step each time) doesn't seem to work properly on the phone.  It all works just fine in the editor though, which is the oddest part about it.  Could there be some sort of stale sizing data cached in there somewhere that the "select game objects" step isn't catering for, perhaps?

One thing that might help with figuring it out - in my canvas I have a reference size of 320*480 and when it runs on my iPhone 4S the resolution there is 640*960.  Given that the panels are only tweening in about half their usual distance, this seems proportionally as if it might be a clue.  Or it might not.

Anyway, the sample project I sent you for the last issue I had can be used to reproduce this, if you swap around the DOTween versions as mentioned - but only on the device build itself and not in the editor.  Let me know if you don't still have the Dropbox link from before, and I can PM it to you again if it helps.

Regards,
Shannon

20
DOTween & DOTween Pro / Re: Adding a Tween to a sequence by its ID
« on: April 25, 2015, 04:50:49 PM »
Okay, thanks for the explanation.  I hadn't spotted the DOPlayById and DOPlayNext - will give those a try, and they should be better than my current method.

I was restarting the sequence actually, and had been assuming that doing so would also restart the tweens inside it.  For the time being, I've switched to using code to trigger my tween chain rather than sequences, but I'll give those another try when the Visual Sequencing editor become available.

21
DOTween & DOTween Pro / Re: Adding a Tween to a sequence by its ID
« on: April 25, 2015, 12:30:09 PM »
Okay, I'm getting closer, I think.

Because I have multiple reusable tweens on each UI object, I couldn't assign the event to the correct function using DG.Tweening.DOTweenAnimation dropdown option, because that dropdown doesn't distinguish which of the multiple tweens to access a function for, and it just calls the first one it finds.  It would be nice if a particular tween could be chosen to fire in an OnComplete, but since it can't, for now instead I'm using my string based tween play function to kick the chain off at appropriate times using the events.

Which seems to work for the first iteration.  However it doesn't work the second time after that - perhaps the tween is getting killed off when executed this way, or something, even though AutoKill is turned off and my function uses Restart().  I'll keep investigating.  It does seem to me though that DOTween seems to be focused more on single-use "play at instantiation" type tweens that are expected to get killed off, rather than reusable tweens for persistent GUI objects.  Anyway, I'm sure a solution will arise.   :)

22
DOTween & DOTween Pro / Re: Adding a Tween to a sequence by its ID
« on: April 25, 2015, 11:19:36 AM »
Okay, the other bug is still there.  This one can also be reproduced using that same sample project, if you set the vDebugSequenceIssue flag unchecked.

In the UI Canvas -> HUDPanelRight -> HUDMenuSprite object, you'll see a DOTween called HUDMenuSpriteFlashUp - the third one down.  This is just scaling the sprite up to 1.5, and as you can see Autoplay is off.  Clicking the "Show HUD" button will bring in the panels but not yet touch this tween, which is only supposed to happen later when you hit "Hide HUD".

Now however, if you change the tween direction from "TO" to "FROM" and do the "Show HUD" you'll see that the scale on the sprite is getting bumped up to 1.5 immediately even though the tween hasn't run yet.  Further investigation shows that the scaling is actually happening on the object even before clicking "Show HUD".  So it looks to me like DOTween is searching for any "FROM" scalars and applying them at startup when the tween is loading, instead of applying them at the time of playing the tween, which is what I would have expected it to do.  I have also reproduced this with my Rotate tweens as well, where I used "FROM".

Am I mistaking the usage of "FROM" here?  I would have thought that if I play a Scale tween of FROM 1.5, on an object with the scale currently at 1, that it would lerp the scale backwards from 1.5 down to 1.  Is that correct understanding?  Instead, because DOTween seems to be changing the scale to 1.5 at startup even before the tween runs, it's effectively tweening from the parameter 1.5 back to its already altered 1.5 and so it stays large and never goes back to 1 as intended.

Anyway, please advise if this is something I need to do differently, or if this is actually a bug of DOTween acting on the FROM changes in advance of its tween playing.

EDIT: I think I know what I've done wrong now.  I was firing off both the scale up and down tweens at the same time, with the down tween having a delay so that it was intended to fire off after the up tween finished.  Foolishly I thought that would take the "current value" as at the time the delay ended, but clearly it's taking it from the time the tween plays instead.

I'll see if I can get the same functionality working more appropriately using OnComplete event to call the next tween.

23
DOTween & DOTween Pro / Re: Adding a Tween to a sequence by its ID
« on: April 25, 2015, 10:38:02 AM »
Ah, ok - that explains it.  I had been thinking that Sequence could be used as a way of grouping shared tweens that are to be used in more than one context, and assumed that there could be reuse of the same tweens in different sequences.  Apparently not.  All right, I guess I'll have to have handle separate copies of each one for its usage.

Hopefully this also explains another bug I was experiencing, where some tweens were strangely firing when they shouldn't, even though they weren't part of the sequence being called.  I'll see if that problem goes away now after fixing for this one.

Thanks for your effort in tracing the problem so quickly.

24
DOTween & DOTween Pro / Re: Adding a Tween to a sequence by its ID
« on: April 25, 2015, 01:22:29 AM »
Sure, no rush - it's midnight here and I'm finishing up for the night myself.  I've got plenty of my own bugs elsewhere in my project that I can tackle in the meantime, so I know what you mean!

25
DOTween & DOTween Pro / Re: Adding a Tween to a sequence by its ID
« on: April 24, 2015, 10:48:57 PM »
Ok, I've put a reproduction of the issue on Dropbox, which I have installed but have never used, so hopefully this works - please let me know if it's not accessible.  I'll PM you the link.

On the UI Canvas object you will see my "HUDManager" scripts.  There's a bool on the inspector called vDebugSequenceIssue which when true will cause the error on startup, but when false will allow at least the portion before the error to go through so that the HUD buttons sort of work and show the tweens. 

Anyway the function in the code where I've left some comments about the error is SetupSequences.

Thanks for taking a look!

26
DOTween & DOTween Pro / Re: Adding a Tween to a sequence by its ID
« on: April 24, 2015, 10:07:29 PM »
Ok, let me see if I can reproduce it in a stripped down version.  What's the best process for sending you the project files?

27
DOTween & DOTween Pro / Re: Adding a Tween to a sequence by its ID
« on: April 24, 2015, 08:50:22 PM »
Hi again,

I've been using my tween finder approach and it's been working fine, so I am now ramping up the number of tweens and sequences. 

I'm currently pre-loading 4 sequences at start time, each with about seven tweens that have ID strings of on average about 25 letters.  However, there seems to be some hard limit getting hit in the dll, as once I get beyond a certain amount of these it gives me:

Code: [Select]
IndexOutOfRangeException: Array index is out of range.
DG.Tweening.Core.TweenManager.RemoveActiveTween (DG.Tweening.Tween t) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenManager.cs:786)
DG.Tweening.Core.TweenManager.AddActiveTweenToSequence (DG.Tweening.Tween t) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Core/TweenManager.cs:165)
DG.Tweening.Sequence.DoInsert (DG.Tweening.Sequence inSequence, DG.Tweening.Tween t, Single atPosition) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/Sequence.cs:56)
DG.Tweening.TweenSettingsExtensions.Insert (DG.Tweening.Sequence s, Single atPosition, DG.Tweening.Tween t) (at D:/DG/_Develop/__UNITY3_CLASSES/_Holoville/__DOTween/_DOTween.Assembly/DOTween/TweenSettingsExtensions.cs:441)

I've tried rearranging the order of the sequence inserts to see if I could identify the culprit, but there doesn't seem to be a particular one it's dying on.  I'm speculating perhaps some buffer is getting filled up in the DLL of a maximum size of some sort hardcoded there?

Anyway, hopefully you can track it down from the line numbers there in the error.  In the meanwhile I'll be looking into a workaround.  Cheers!

28
Ok thanks, I will try that.  I don't see DOAnchorPos in the dropdown list in the visual editor however, so does that mean these can only be done via code?

EDIT: Actually I just discovered what the problem was - I've installed the latest downloads area patch and noticed that this was the fix you applied in 0.9.180, to have Move use anchor pos for UI objects.  I had been still running off the stock install before that.  Works perfectly now!

29
Hi again,

This one has been stumping me for a long time, also back when I was using a previous UI/tweening tool.  I'm not entirely sure if it's something I'm not doing right, or if it's a limitation, but anyway I'll try to explain and hopefully you may be able to help me.

I am writing a phone game for iOS where the user can change the phone orientation from portrait to landscape and the autorotate kicks in.  There are three "HUD" panels at the top edge of the screen (top left, top right, and top center) which tween by sliding out when the pause menu panel opens, and sliding back in with a bounce when the menu closes.  This *mostly* works fine using the anchors to keep it all consistent, but there is an issue.

Let's say I start in portrait mode.  I am using a relative Move tween to for example move my top left panel from its usual offscreen Pos X of -50 to a relative Move X of 50.  The panels slide in and out fine when triggered and all looks good.  Also, if I start in Landscape mode, it works as well.  So I am speculating that perhaps DOTween (or Unity?) could be recording the "at start" resolution somehow and basing calculations off that.

Anyway once the panels are currently onscreen in Portrait and I tilt the phone to landscape, Unity adjusts it fine via the anchors and the panels stay in their correct positions at the top corners and top center, adjusted proportionally for the change in resolution.  But then - disaster!  When I trigger my tween to slide the panels back out, the panels do not leave properly but instead jump off towards the middle of the screen as if the anchor was somehow still set to the Portrait X sizing.  Also when triggering the panels to slide back in, they also clump up on the left and the top right panel ends up in the middle - again I am speculating that somehow the calcs are still thinking the anchor edge is the one from Portrait mode, and that something wasn't refreshed when the phone orientation changed.

Any ideas?  This can also be reproduced in the editor by changing the resolution from say iPhone tall to iPhone wide during play.  I'm really hoping it's just something I haven't done properly or that there's a workaround for it, so any advice you might have will be appreciated.

30
DOTween & DOTween Pro / Re: Adding a Tween to a sequence by its ID
« on: April 21, 2015, 07:31:14 PM »
Great, thanks, I'll give that a try.  I had worked around it using TweensByTarget but this fix will be better.

For the booleans, after playing with it further, that feature seems to be able to be worked around already via your tween events, so I'm now using the GameObject.SetActive call off the OnComplete event.  So it's all good there, if a little clunky with needing to store the objects in code so they can be re-enabled later, but that's a Unity limitation anyway.  Hopefully one day Unity will add an actual visibility flag on the canvas renderer and make a lot of people happier.   :D

Cheers, and thanks for the quick response!


Pages: 1 [2] 3