GameToolkit-Localization
GameToolkit-Localization copied to clipboard
Cannot set property of custom MonoBehaviours
In my case I have a LocalizedVideoClip which I would love to be able to use to set a public VideoClip property of a MonoBehaviour class but it seems to only be able to find the VideoClip property of a VideoPlayer component. All properties of my own classes, even though they have a compatible type, are completely ignored. Is this how it's supposed to work?
At the moment I'm using a workaround based on this method:
VideoClip videoClip;
GameToolkit.Localization.LocalizedVideoClip lvc =
Resources.Load<GameToolkit.Localization.LocalizedVideoClip>(_localizedResourcePath);
lvc.TryGetLocaleValue(Localization.Instance.CurrentLanguage, out videoClip);
which works but it would be great to also have the option to point to any public variables (of matching type) from LocalizedAsset<T>'s editor. Not sure if this is feasible.
Thanks for this Localization asset and for looking into this.
Hi can you send me an example?