public void OnBranchesUpdated(IList<Branch> aBranches)
{
string branchName = "-1";
if (aBranches.Count > 0)
{
branchName = aBranches[0].DefaultDescription;
}
Debug.Log("OnBranchesUpdated " + branchName + " branch cnt " + aBranches.Count);
}
public void Init(ArticyObject flowObj = null)
{
if (flowObj != null)
{
ArticyFlowPlayer flowPlayer = GetComponent<ArticyFlowPlayer>();
flowPlayer.StartOn = flowObj;
flowPlayer.Play();
}
}
OnBranchesUpdated -1 branch cnt 0
OnBranchesUpdated 0x100000000001168 branch cnt 1
OnBranchesUpdated 0x100000000001168 branch cnt 1
OnBranchesUpdated 0x100000000001168 branch cnt 1... (same results)
[Articy] Nico Probst wrote:Hi shanehou,
The "End" is not always the same for each project. For example in our Demo Project a Dialogue has reached its end when all branches are not of the DialogueFragment type anymore, then we hide the Dialogue UI.
But the easiest is just checking if the list of branches is empty, that will tell you that you reached the end of your flow. Or do you need something different?
Best regards
Nico
public void OnBranchesUpdated(IList<Branch> aBranches)
{
string branchName = "-1";
if (aBranches.Count > 0)
{
branchName = aBranches[0].DefaultDescription;
}
Debug.Log("OnBranchesUpdated " + branchName + " branch cnt " + aBranches.Count);
}
public void Init(ArticyObject flowObj = null)
{
if (flowObj != null)
{
ArticyFlowPlayer flowPlayer = GetComponent<ArticyFlowPlayer>();
flowPlayer.StartOn = flowObj;
flowPlayer.Play();
}
}
OnBranchesUpdated -1 branch cnt 0
OnBranchesUpdated 0x100000000001168 branch cnt 1
OnBranchesUpdated 0x100000000001168 branch cnt 1
OnBranchesUpdated 0x100000000001168 branch cnt 1... (same results)
- Code: Select all
flowPlayer.StartOn = flowObj;
flowPlayer.Play();
Return to articy:draft Unity Importer
Users browsing this forum: No registered users and 9 guests