"On Localize Call" without target

  • Multiplayer
  • Topic Author
  • Visitor
  • Visitor
10 years 6 months ago #126 by Multiplayer
"On Localize Call" without target was created by Multiplayer
Hi

I would like to use the localize scripts "On Localize Call" to call my own script whenever language is changed, since I use none of the pre-implemented components such as NGUI or TextMesh.

But it seems like there is no message sent unless something is selected as a target (other than "none") for the localize script, even if I do not need the script to do anything by itself. Everything works if i simply add a component like GuiText and set it as the target. I can then disable that component and my script gets called anyway. But it would of course be much better if I did not have to do that.

Is there a way to use only the "On Localize Call" without using any other components?

Please Log in or Create an account to join the conversation.

More
10 years 6 months ago #131 by Frank
Hi,

I just added an event that gets called whenever the language is changed. (Version 2.1.0 b3)

There is no longer need to add a Localize component to an object in order receive a call, just register the function that will handle the custom localization.
void Start()
{
	LocalizationManager.OnLocalizeEvent += CustomLocalization;
}

public static void CustomLocalization()
{
	// This function gets called whenever the language is changed
}

Hope that helps,
Frank

Are you :-) Give I2L 5 stars!
Are you :-( Please lets us know how to improve it!
To get the betas as soon as they are ready, check this out

Please Log in or Create an account to join the conversation.

  • Multiplayer
  • Topic Author
  • Visitor
  • Visitor
10 years 6 months ago #132 by Multiplayer
Replied by Multiplayer on topic "On Localize Call" without target
Thanks a lot for the quick change, that should do it.

I will send you an email to get access to the newest version.

Please Log in or Create an account to join the conversation.

Time to create page: 0.146 seconds
Template by JoomlaShine