Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Improve the Unity tutorial. #2

Open
desplesda opened this issue Feb 15, 2016 · 8 comments
Open

Improve the Unity tutorial. #2

desplesda opened this issue Feb 15, 2016 · 8 comments
Assignees

Comments

@desplesda
Copy link
Contributor

The tutorial needs to be fleshed out, and turned into a step-by-step set of instructions.

@smkmth
Copy link

smkmth commented May 7, 2017

I agree, i dont know if this should go here, but I want to know specifically how to get a variable from yarn spinner and change it in Unity. I can set variables in yarn spinner, and they show up on the debug variables in my variablestorage list but if i try to access any of these variables outside yarn spinner i start to run into problems.

At the moment I find the existing documentation on variable storage to be a bit unhelpful as I dont know what "an object that conforms to a C# [interface](C# interface)" exactly is, where to look for an outside tutorial or even if this is what i need to understand. Even if all that was added was a link to Unity Documentation on the topic or something similar i would be grateful.

It would be nice if the space station demo script provided had an example of an intractable object in the Unity gamespace, which sets a variable in Yarn. Maybe a NPC asks you to press a button on the ship, and thanks you if you do this. This would help me understand how Yarn Spinner interacts with Unity.

@PeteLawler
Copy link

PeteLawler commented Jun 23, 2017

I'm working on fixing up the Step by Step, however at the moment it'd seem the demos are broken and need a bit of tweaking to actually execute in current Unity.
@smkmth 'C# [interface](C# interface)' is a typo, and should really just be something like 'C# interface' - that's to say linking to MS's document about C# interfaces.

@4remy
Copy link

4remy commented Jun 25, 2017

I'm confused by the position co-ordinates in sally.json and ship.json. They don't appear to relate to the placing of the text in the UI, but there are multiple co-ordinates following the dialogue (eg "position": {
"x": 721,
"y": 130
},). I've messed with them a lot, but haven't seen any changes whatsoever.
Could you possibly explain what they are? Was looking for where to change the way the text displays. Many thanks for your time and patience.

@desplesda
Copy link
Contributor Author

They control the position of the node in the Yarn editor.

To control the way your text displays, you customise the code in your DialogueUIBehaviour subclass.

@4remy
Copy link

4remy commented Jun 25, 2017

Oh, I understand now. I wasn't viewing the nodes, and I had assumed it was to do with the in-game UI, which I was looking for. Thank you for your time.

@desplesda
Copy link
Contributor Author

Not a problem!

@PeteLawler
Copy link

@4remy thanks for the question, I've made an adjustment to the Dialogue documentation in change 8f484e0c31637b1831be822ad9d912a180bbb69c that will hopefully clarify things according to @desplesda's comment.

@HeyItsLollie
Copy link

Hope it's okay to bump this issue back up, it felt more suitable to post here.

As of 1.1, the tutorial only covers the Yarn scripts, and doesn't touch on the Unity scene at all. It'd be useful to extend the current tutorial with a breakdown of the included Example Scene in Unity, covering features that are relevant to Yarn Spinner:

  • Creating and setting up custom command scripts (SetSprite), and adding the script to the relevant game object (SpriteSwitcher.cs)
  • NodeVisited.cs
  • The "CheckForNearbyNPC" function inside PlayerCharacter.cs
  • NPC.cs, and the rationale behind its use in this scene

@desplesda desplesda transferred this issue from YarnSpinnerTool/YarnSpinner Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants