Search Unity

Using tags from Ink in Unity.

Discussion in 'Getting Started' started by sodakin, Mar 24, 2017.

  1. sodakin

    sodakin

    Joined:
    Mar 24, 2017
    Posts:
    1
    I'm using the ink plugin to make a interactive fiction with Unity.
    Some of the text (e.g. character narrration), I want appearing line by line.
    Other text (e.g. descriptions), I want appearing as a block of multi-lined text.
    I'm hoping to differentiate these two by using tags and calling different draw functions for each type but I'm a bit lost on how to query tags in the script.

    I'm new to Unity and there isn't much on the Ink Unity plugin around the web so any help is appreciated!
     
  2. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    There is a method FindGameObjectsWithTag, but I'm not sure if that's what you want here. Instead, I would have a script attached to the display objects that checks its own GameObject's tag, and if it's one thing, it calls one draw function, and if it's the other, it uses a different draw function.

    I don't have a clue how this plugin works, so I'm just shooting in the dark here. But there may be a another way, even, where you basically only have two objects (a dialogue window and a description window) and display the appropriate one with necessary text using the desired draw method as needed. This could be handled through a singleton manager in the scene. Again, this may or may not work for how this plugin actually works, though, and it's more of a style choice than anything.

    Good luck!