playMaker

Author Topic: Problem sending string to UI Text  (Read 2236 times)

ToxicFrog

  • Beta Group
  • Full Member
  • *
  • Posts: 139
Problem sending string to UI Text
« on: March 18, 2015, 03:38:07 PM »
Hello friends,

I am simply trying to display a score, and am missing something simple.

I've attached images of the Text Object in question, the FSM State, and the Error I'm getting.

Please have a look and let me know what I'm doing wrong.

Thanks! I'll reply with results.



Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Problem sending string to UI Text
« Reply #1 on: March 18, 2015, 03:43:16 PM »
You are targeting the GameObject and not the UI Text component.

Lock the FSM view with the Lock button (top center of the graph space), click the UI, drag the UI Text component directly over to the Set Property field, choose Text>String as the property, specify your variable.

GUI is legacy. UI is new... guiText is some GameObject property totally unrelated to what you are trying to do.

Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D

ToxicFrog

  • Beta Group
  • Full Member
  • *
  • Posts: 139
Re: Problem sending string to UI Text
« Reply #2 on: March 18, 2015, 04:02:13 PM »
Perfect - problem solved!

Thanks a lot!

ToxicFrog

  • Beta Group
  • Full Member
  • *
  • Posts: 139
Re: Problem sending string to UI Text
« Reply #3 on: March 18, 2015, 04:18:32 PM »
Follow up:

When I run the game, the score is not updating on the in-game UI. When I stop the game, it updates with the expected score, but it's not updating in real-time.

I attached an image of how I have the state set up (on an empty game object).

Do I need to add something to the Text object itself to make it update constantly?


ToxicFrog

  • Beta Group
  • Full Member
  • *
  • Posts: 139
Re: Problem sending string to UI Text
« Reply #4 on: March 18, 2015, 04:32:01 PM »
Cancel that follow-up. I figured it out. Thanks again!