Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question Assign a component in different node to format argument

Discussion in 'Localization Tools' started by unace, May 15, 2020.

  1. unace

    unace

    Joined:
    Oct 13, 2014
    Posts:
    23
    Hi,
    I am trying to use "Smart string", but I encountered an issue.

    upload_2020-5-15_0-17-6.png

    Localize string works well if I assigned "Apples" component in the same node to format argument.

    upload_2020-5-15_0-22-53.png

    However, localize string doesn't work if I assigned a different node that has "Apples" component to format argument.
    So I was trying to assign "Apples" component in "This node has Apples component" node to format argument, but i couldn't find the way.
    Could you please let me know how to do that?

    Thanks
     
  2. karl_jones

    karl_jones

    Unity Technologies

    Joined:
    May 5, 2015
    Posts:
    7,846
    Hi,

    I suspect its because in the first example you attached the script however in the 2nd you attached the GameObject. Try opening 2 inspectors and lock one to the Localized script. Then drag the script over to the slot.
     
    Last edited: May 15, 2020
    tonialatalo likes this.
  3. unace

    unace

    Joined:
    Oct 13, 2014
    Posts:
    23
    OMG. I didn't know I can open 2 inspectors! Thanks for the reply!
     
    karl_jones likes this.
  4. pezezzle

    pezezzle

    Joined:
    Nov 17, 2019
    Posts:
    11
    LOL same, works, thx a lot.