Inheritance: Yarn.Unity.DialogueUIBehaviour
コード例 #1
0
    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;
    }
コード例 #2
0
    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;
    }