Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by DChap · Mar 16, 2018 at 08:57 AM · timeline

How to trigger Timelines/ Playables from within a Timeline?

I know this is probably a stupid question, but I cannot figure out how to simply trigger another Timeline from within a Timeline.

For instance, I have Seq_01 and at the end of it, I want to trigger Seq_02 (which is a small looping anim). I tried putting Seq_02 into the Seq_01 Timeline as an activation track. It will play one loop of the anim and then stop. Seq_02 will trigger and loop properly if I have it set to 'Play On Awake', but that won't work for me since I don't want this Timeline to Play On Awake, I want it to be triggered.
I'm not really sure about the proper way to go about this, and I'm also not entirely sure how the Play On Awake function works for Timeline, it seems to behave not exactly how I would expect.
Any help is appreciated, thanks!

alt text

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by seant_unity · Mar 16, 2018 at 11:18 AM

Use a control track, instead of an activation track. It will automatically play the PlayableDirector on another gameObject.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by DChap · Mar 17, 2018 at 01:05 AM

Thanks, I tried using a Control track instead of an Activation track, it sort of reacts the same way though.


I added a control clip to the end of Seq_01 and set the Source Game Object to Seq_02. I have Control Activation checked and Post Playback set to Active. It will play that one loop of Seq_02 at the end and then stop, even though Seq_02 (and the animation track in it) are set to loop.

It seems there is also a field for Prefabs on the Control clip, why are there two fields? Do the timelines need to be prefabs as well? Is there something special you have to do to get the new timeline (Seq_02) to loop as intended?

Thanks for the help! alt text


timeline-controltrack.jpg (259.9 kB)
Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image seant_unity · Mar 19, 2018 at 11:24 AM 0
Share

Set the Wrap $$anonymous$$ode for the PlayableDirector on Seq_02 to loop. Then extending the control track clip will support looping.

As for the prefab field, if you supply a prefab with a playable director or particle system on it, the control track will automatically instantiate (and destroy) the prefab and control any playableDirectors and/or particle systems on it.

avatar image DChap · Mar 20, 2018 at 09:11 PM 0
Share

Hmm, Seq_02 is definitely set to loop. The Recorded clip in Seq_02 is also set to Loop in its 'Post-Extrapolate' setting. Also the clip asset itself has 'Loop Time' checked. I'm trying my hardest to tell this thing to loop.

What do you mean by 'extending the control track clip'? If I extend the length of the control track clip to say, 3 loops, then Seq_02 will play for 3 loops and then stop. The animation stops when the slider reaches the end of Seq_01.

Do you know if there are any tutorials or docs specifically about Control Tracks? I'm afraid I can't seem to get them to work and I don't know what I'm doing wrong.

Thank you for the help.

avatar image seant_unity DChap · Mar 21, 2018 at 11:47 AM 1
Share

I think I misunderstood what you were trying to do. If I understand correctly you want to play Seq01, then at the end trigger Seq02 to loop indefinitely. Is that correct?

In the scene, disable the Seq02 gameObject but set it's playOnAwake flag to true, and make sure the wrap mode is set to loop.

Then use an Activation Track, but in the track properties set the PostPlaybackState to 'Leave As Is' (or Active). That will make Seq02 turn on Seq01 and the play on awake flag should take over. $$anonymous$$ake sure the clip is at the end of the timeline.

Hope that helps.

avatar image DChap seant_unity · Mar 23, 2018 at 12:56 AM 0
Share

Thanks, yes that is correct and the way you described seems to be the only way to get the effect I'm looking for. If 'Play On Awake' is not checked then it seems like it will only play Seq_02 for the length of the Activation clip in Seq_01. I'm still a little unclear on the subtleties of the system, but this should be sufficient for what I'm trying to do- I think the key was making sure Seq_02 was disabled to start.

Thank you for all the help!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

75 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Stop/start Animation Timeline on click? 0 Answers

TIMELINE: How to set a character’s initial position, without overriding the animation transforms? 2 Answers

Customize Timeline Clip background 0 Answers

Issue Creating Playables, Trying to create Track and clip at runtime 1 Answer

Add Curve key to Timeline CustomClip via C# script not working. 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges