edited January 2020 in ORK Support
I ve added a Scene Object Component to my Prefab. It has the Custom Text Code npcname assigned to it with a name in the text section. It also has the Object HUD Component attached. Within my HUD settings I have a HUD setup. When I place regular text in this box it all displays correctly. The issue I'm having is I don't know how to pull that custom text code in to the text box. I've tried reading the forums to see if there is explaination how custom txt codes work but I cant seem to find anything. Chance's are I'm going about this the wrong way anyway.

The goal is to have a Name displayed above the prefab. It needs to be variable as each prefab will be diffirent. It also needs to work at range. Am I going about this the right way and I'm simply making a mistake on how the custom text code bit works or with how Object HUD works?
Post edited by Talairina on
Legends of Thamia - Coming soon to Android.
  • You need to use the text code in the content information of the scene object.

    E.g. set it as the Short Name and use the short name text code in the object HUD (%sn).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited January 2020
    Thanks for the quick reply but I'm not sure I have this setup correctly. I've attached two screen grabs with the settings used and it's outcome. Perhaps you can call me an idiot and spot what I'm missing/doing wrong.

    This is the outcome;
    https://pasteboard.co/IRrazNJ.png

    And these are the settings;
    https://pasteboard.co/IRrb8wf.png
    Post edited by Talairina on
    Legends of Thamia - Coming soon to Android.
  • Yeah, that's wrong :)

    In your scene object's settings (in ORK, not on the component) use the text code in the Short Name setting, e.g. set it to %custom.
    In the scene object component, use the same text code %custom and define the text for it.

    In the object HUD, the %sn text code is correct :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Like this? I feel like I'm really struggling to understand the links between a Scene Object, Custom Text Code and to define them all.

    https://pasteboard.co/IRrhUER.png
    Legends of Thamia - Coming soon to Android.
  • No, not like this - alright, here's the step by step:

    In World > Scene Objects in the scene object you want to use:
    - Content Information > Short Name, set this to %custom (or however you want to name your custom text code)

    On your game object in the scene, in the Scene Object component:
    - add a custom text code
    - set Text Code to %custom
    - define the Text the text code should display

    In Menus > HUDs in your Object HUD:
    - use %sn text code where you want to display it.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Clearly I'm way too tired to be playing with this. Doh. Thank you for your patience in walking me through it. So daft of me. Got it how I needed it.
    Legends of Thamia - Coming soon to Android.
  • You're welcome :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.