Author Topic: Symbols won't show up in play mode unless used once in editor mode?  (Read 3497 times)

getluky

  • Guest
The new symbols editor is awesome! Unfortunately I'm running into some very weird issues with a symbol-enabled font where symbols won't show up in play mode unless they're used in editor mode first.

Here are some easy repro steps:

1. Start a new project, import NGUI 2.3.6a
2. Open the Menu example scene
3. Open SciFi Font - Normal font prefab in inspector
4. Add the X sprite as TEST_SYMBOL
5. Hit play mode immediately without adding to text yet
6. Try adding TEST_SYMBOL to the left block of text and observe that it doesn't work.
7. Hit stop
8. Add TEST_SYMBOL to the left block of text now that you're in editor mode, see that it shows up
9. Remove TEST_SYMBOL again
10. Hit play
11. Add TEST_SYMBOL to the left block of text while in play mode, see that it shows up

I think that should be enough to track it down. Once it's been put into editor mode, it'll survive scene switches unless the new scene doesn't use the same font. If the editor is restarted or you open a scene without the prefab, it'll reset again and you'll need to add it in editor mode to get the symbol to work again.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Symbols won't show up in play mode unless used once in editor mode?
« Reply #1 on: March 20, 2013, 02:05:54 PM »
You need to hit SAVE first before hitting Play. CTRL+S.

getluky

  • Guest
Re: Symbols won't show up in play mode unless used once in editor mode?
« Reply #2 on: March 20, 2013, 02:11:31 PM »
Just tried saving the scene before hitting play using hotkey and menu. Doesn't appear to resolve the issue.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Symbols won't show up in play mode unless used once in editor mode?
« Reply #3 on: March 20, 2013, 02:16:18 PM »
Hmm you're right, something strange going on there. Unfortunately I have 2 days left to finish preparing for my GDC talk, and I can't look at it right now.

getluky

  • Guest
Re: Symbols won't show up in play mode unless used once in editor mode?
« Reply #4 on: March 20, 2013, 02:18:10 PM »
That's okay, I think there's an ugly workaround for the time being (have a label with all symbols that gets deactivated on scene start). I just wanted to bring it to your attention. Thanks and good luck!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Symbols won't show up in play mode unless used once in editor mode?
« Reply #5 on: March 20, 2013, 02:34:02 PM »
Fixed it in 2.5.0 after all.