Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added PlayTimeline command #1024

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

GuroGuru
Copy link

Description

This PR is a new feature, the command PlayTimeline.

What is the current behavior?

Currently Fungus animation-related commands don't compreehend the Unity Timeline functionality, importing sequencing tool.
Issue Number: #627

What is the new behavior?

The new command PlayTimeline allows specifying a Timeline object from the scene and play it during the flow. It also allows choosing whether if the flow will be blocked until the timeline stops or if it will continue the execution.

Important Notes

  • My change adds tests or test scenes
  • My change adds demos to FungusExamples

Other information

@stevehalliwell stevehalliwell added this to the 3.15 milestone Aug 21, 2021
Copy link
Contributor

@breadnone breadnone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps restructure it better to be inline with Fungus coding standards. Any wait operations usually called waitUntilFinished.

And you can wrap your if condition for continue inside your delegate function to reduce code duplication

Something like this

            if (timeline != null)
            {
               timeline.stopped += delegate 
               {
                  if(waitUntilFinished)
                  Continue();
               };
            }
            if(!waitUntilFinished)
            {
                Continue();
            }```

@GuroGuru
Copy link
Author

@breadnone, thanks for the tip! By the weekend I'll update the code based on your suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants