PS:im not good at English, The following is almost from the Google Translation.
I tried switching to another project while running to a certain command and started running it.
When I try to replace the Project of the same runner in the command execution, the re-run Dialogue will skip some text.
Please provide the steps to reproduce, and if possible a minimal demo of the problem:
This is a small piece of code that can be tested, the runner and the two yarnProject are all passed in from the parameters of the Unity Editor.
The first and third lines of testProject are skipped when replacing yarnProject like this. You can view the gif image at the end.
PS: I probably shouldn't act like this but I don't know how.
public DialogueRunner runner;
public YarnProject defaultProject;
public YarnProject testProject;
// Init Commands and Load fist Project:
void Awake()
{
runner.AddCommandHandler<string, string>("switch_project", SwitchTest);
runner.SetProject(defaultProject);
runner.StartDialogue("Start");
}
void SwitchTest(string name, string title)
{
runner.Stop();
runner.Clear();
// YarnProject project = AssetDatabase.LoadAssetAtPath<YarnProject>("Assets/Story/" + name + "/" + name + ".yarnproject");
// runner.SetProject(project);
// runner.StartDialogue(title);
runner.SetProject(testProject);
runner.StartDialogue("Main");
}
What is the current behavior?
PS:im not good at English, The following is almost from the Google Translation.
I tried switching to another project while running to a certain command and started running it. When I try to replace the Project of the same runner in the command execution, the re-run Dialogue will skip some text.
Please provide the steps to reproduce, and if possible a minimal demo of the problem:
This is a small piece of code that can be tested, the
runner
and the twoyarnProject
are all passed in from the parameters of the Unity Editor. The first and third lines of testProject are skipped when replacing yarnProject like this. You can view the gif image at the end.PS: I probably shouldn't act like this but I don't know how.
What is the expected behavior?
Just switched from defaultProject to testProject and it worked.
Please tell us about your environment:
Other information
You can see that the options are even missing one item because the first and third lines have disappeared.