Return to Unity Plugin

Cannot play a sequence in GAF Pro

All about Unity plug-in

Cannot play a sequence in GAF Pro

Postby Ramandeep Singh » August 2nd, 2018, 12:05 am

Hello friends...

I used GAF free for a game and used GAFBakedMovieClip to play sequences
Code: Select all
GAFBakedMovieClip movieClip;

void Start () {
movieClip.setSequence (SequenceName);
}


For some reasons, I switched to GAF Pro and now I use GAFAnimator, so the problem is that there is no function to play sequence like GAFBakedMovieClip. I have to use Animator to setSequence.

Code: Select all
Animator anim;

void Start () {
anim.Play (SequenceName);
}


This seems to be more costly than previous one...
can i have a solution for this??
please help
User avatar
Ramandeep Singh
 
Posts: 11
Joined: August 1st, 2018, 11:50 pm

Re: Cannot play a sequence in GAF Pro

Postby Alexey Finkilshtein » August 6th, 2018, 2:51 pm

Hi,

In animator each sequence is state, so you can switch your states to change sequences.

Thanks.
User avatar
Alexey Finkilshtein
 
Posts: 429
Joined: May 21st, 2014, 6:53 am

Re: Cannot play a sequence in GAF Pro

Postby Ramandeep Singh » August 13th, 2018, 10:35 pm

Alexey Finkilshtein wrote:Hi,

In animator each sequence is state, so you can switch your states to change sequences.

Thanks.


thanx for reply alexey, i'm doing the same as u suggested, switching states of animator, like:
Code: Select all
Animator gafAnim;

void function(){
gafAnim.Play(sequenceName);
}


but if i set GAFAnimator's wrap mode to once, it doesn't play it once but on loop and it's not easy to handle
currently i'm handling this by playing idle sequence after playing specific sequence but it seems to be costly to do...
can u suggest any better way to do this..
thanx in advance...
User avatar
Ramandeep Singh
 
Posts: 11
Joined: August 1st, 2018, 11:50 pm

Re: Cannot play a sequence in GAF Pro

Postby Alexey Finkilshtein » August 14th, 2018, 2:19 am

You need to select your animator file and change loop checkbox
Attachments
animator loop.png
User avatar
Alexey Finkilshtein
 
Posts: 429
Joined: May 21st, 2014, 6:53 am

Re: Cannot play a sequence in GAF Pro

Postby Ramandeep Singh » August 15th, 2018, 7:40 am

Alexey Finkilshtein wrote:You need to select your animator file and change loop checkbox

I know that but i have too many animations to play and it is determined in runtime if the sequence is to be played on loop or not. Do I have to reload animation to set GAFAnimator's wrap mode?
User avatar
Ramandeep Singh
 
Posts: 11
Joined: August 1st, 2018, 11:50 pm

Re: Cannot play a sequence in GAF Pro

Postby Alexey Finkilshtein » August 16th, 2018, 7:11 am

You can try it.
Anyway, you need to find your answer at unity forum or stackoverflow (how to turn off\on loop time in .anim file via script)
User avatar
Alexey Finkilshtein
 
Posts: 429
Joined: May 21st, 2014, 6:53 am

Re: Cannot play a sequence in GAF Pro

Postby Ramandeep Singh » August 17th, 2018, 2:43 am

Alexey Finkilshtein wrote:You can try it.
Anyway, you need to find your answer at unity forum or stackoverflow (how to turn off\on loop time in .anim file via script)

thanx for help.. i'll give it a try
User avatar
Ramandeep Singh
 
Posts: 11
Joined: August 1st, 2018, 11:50 pm

Re: Cannot play a sequence in GAF Pro

Postby ggnhoi hkui » January 9th, 2019, 1:30 am

Alexey Finkilshtein wrote:You can try it. :)
Anyway, you need to find your answer at unity forum or stackoverflow (how to turn off\on loop time in .anim file via script)

thanx for help.. i'll give it a try
User avatar
ggnhoi hkui
 
Posts: 1
Joined: January 9th, 2019, 1:29 am

Return to Unity Plugin

Who is online

Users browsing this forum: No registered users and 1 guest