Shortcut function to get Localize Component
9 years 3 weeks ago #1132
by yuewah
Shortcut function to get Localize Component was created by yuewah
Sometime, adding localize component and set term in code is preferred.
Is it possible to add the following static function to get and add localize component if not exist ?
Localize.cs
static public Localize Get (GameObject go)
{
Localize localize = go.GetComponent<Localize>();
if (localize == null) localize = go.AddComponent<Localize>();
return localize;
}
Is it possible to add the following static function to get and add localize component if not exist ?
Localize.cs
static public Localize Get (GameObject go)
{
Localize localize = go.GetComponent<Localize>();
if (localize == null) localize = go.AddComponent<Localize>();
return localize;
}
Please Log in or Create an account to join the conversation.
Time to create page: 0.160 seconds