Articyflowplayer - start / stop / continue in Unity

Thu 11. Jul 2019, 08:46

Hi all,

I am using Articy to export to Unity and I am trying to get to grips with the flowplayer.

I'd ideally like to play a flow (dialogue) - pause the flow - have the player interact with the game - restart the flow.

I have created a custom flowfragment for the 'pause' . Is this a valid approach? Any tips would be appreciated on how to stop / start the flow in C#.

I'd also like to create the flowplayer from code rather than set the StartOn from the Unity UI.

Thanks!
k2022
 
Posts: 5
Joined: Wed 3. Jul 2019, 01:48

Re: Articyflowplayer - start / stop / continue in Unity

Fri 12. Jul 2019, 08:44

Hi k2022,

currently it is not supported to manually pause the flow, because the flow traversal is done as quickly as possible, so there wouldn't be really time to pause "in between". When the flow player pauses it pauses on node types you marked in PauseOn. If you don't want to traverse the flow just don't call Start again after one of those pauses. If you check our demo project "Maniac Manfred" you will see this in action: When you click on something a dialogue might appear, driven by the flow player, and after the last sentence the dialogue UI disappears but the flow player is still pausing at the last node. I you still need a pause, your approach should work just fine, remember: Everytime a node type is hit on traversal that is in PauseOn the flow player will not continue traversal until you call StartOn again or any Play() method.

I'd also like to create the flowplayer from code rather than set the StartOn from the Unity UI.


This sounds like two different questions: You can create the ArticyFlowPlayer Component from code with unitys AddComponent() and you can call StartOn in code just as well, but be careful to not use the field startOn in Code please use StartOn with a capital S.

Hope that helps

Best regards

Nico
Nico Probst
Senior Software Engineer | Articy | LinkedIn
User avatar
[Articy] Nico Probst
Articy Staff
Articy Staff
 
Posts: 217
Joined: Wed 23. Nov 2011, 09:45
Location: Bochum

Re: Articyflowplayer - start / stop / continue in Unity

Sun 14. Jul 2019, 07:17

Hi Nico.

That makes sense and everything is now working apart from the fact that the OnFlowPlayerPaused method seems to be called continuously (every frame?) during a Pause while the player is interacting with other parts of the game.

Is this by design or is something going wrong?

Thanks
k2022
 
Posts: 5
Joined: Wed 3. Jul 2019, 01:48

Re: Articyflowplayer - start / stop / continue in Unity

Tue 16. Jul 2019, 11:43

That makes sense and everything is now working apart from the fact that the OnFlowPlayerPaused method seems to be called continuously (every frame?) during a Pause while the player is interacting with other parts of the game.


This happens if you have ContinouslyCalculateBranches enabled, we still debating internally if it should only call OnBranchesUpdate or both. If you need that flag, make an early out in the FlowPlayer checking the ID of the paused object.

Hope that helps

Best regards

Nico
Nico Probst
Senior Software Engineer | Articy | LinkedIn
User avatar
[Articy] Nico Probst
Articy Staff
Articy Staff
 
Posts: 217
Joined: Wed 23. Nov 2011, 09:45
Location: Bochum

Re: Articyflowplayer - start / stop / continue in Unity

Wed 17. Jul 2019, 06:28

Yes - that answers my question.

Thank you for your help!!
k2022
 
Posts: 5
Joined: Wed 3. Jul 2019, 01:48

Return to articy:draft Unity Importer

Who is online

Users browsing this forum: No registered users and 13 guests

Who We Are
Contact Us
Social Links