public void SetUp() { //Arrange // Create the dialogue runner var dialogueHost = new GameObject(); dialogueRunner = dialogueHost.AddComponent <Yarn.Unity.DialogueRunner>(); // Create the variable storage //variableStorage = dialogueHost.AddComponent<ExampleVariableStorage>(); // Load the test script var text = AssetDatabase.LoadAssetAtPath <TextAsset>("Assets/Yarn Spinner/Examples/Demo Assets/Space.json"); dialogueRunner.AddScript(text); dialogueUI = dialogueHost.AddComponent <TestDialogueUIBehaviour>(); dialogueRunner.dialogueUI = dialogueUI; }
public void SetUp() { //Arrange // Create the dialogue runner var dialogueHost = new GameObject(); dialogueRunner = dialogueHost.AddComponent<Yarn.Unity.DialogueRunner>(); // Create the variable storage //variableStorage = dialogueHost.AddComponent<ExampleVariableStorage>(); // Load the test script var text = AssetDatabase.LoadAssetAtPath<TextAsset>("Assets/Yarn Spinner/Examples/Demo Assets/Space.json"); dialogueRunner.AddScript(text); dialogueUI = dialogueHost.AddComponent<TestDialogueUIBehaviour>(); dialogueRunner.dialogueUI = dialogueUI; }