YarnSpinnerTool / Docs-1.0

Yarn Spinner 1.x Documentation
https://yarnspinner.dev
4 stars 10 forks source link

Improve the Unity tutorial. #2

Open desplesda opened 8 years ago

desplesda commented 8 years ago

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

smkmth commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

Not a problem!

PeteLawler commented 7 years ago

@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 commented 4 years ago

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: