handling ink stories at runtime
Posted: Mon Jul 10, 2023 12:46 pm
Hello everyone,
before I add an ink story at runtime, I check if it has already been added. But after I added the Story, it still doesn't seem to be in the stories list. Therefore, clearing the list doesn't help either preventing it to be added again, which throws an error.
Is there a way I can get access to the stories added at runtime (like clearing them, checking if one has been added etc.)?
Thanks in advance!
before I add an ink story at runtime, I check if it has already been added. But after I added the Story, it still doesn't seem to be in the stories list. Therefore, clearing the list doesn't help either preventing it to be added again, which throws an error.
Code: Select all
if (inkIntegration.stories.Contains(story))
{
Debug.Log("a story with the same name has already been added");
}
else
{
Debug.Log("story was added");
inkIntegration.AddStory(storyName, story.ToJson());
}
Thanks in advance!