private void AddImage(LocalizedSprite s) { LocalizeSpriteEvent image = Instantiate(imagePrefab, contentRect); image.gameObject.SetActive(true); image.AssetReference.SetReference(s.TableReference, s.TableEntryReference); }
public PopUpData(PopUpData data) { title = data.title; content = data.content; image = data.image; localizedTitle = data.localizedTitle; localizedContent = data.localizedContent; localizedImage = data.localizedImage; }
private void OnEnable() { myController = (LocalizedSprite)target; /* * if(myController.Sprites.Length != LocalisationController.Instance.Languages.Length) * { * while(myController.Sprites.Length != LocalisationController.Instance.Languages.Length) * { * if(myController.Sprites.Length > LocalisationController.Instance.Languages.Length) * { * RemoveNode(myController.Sprites[myController.Sprites.Length-1]); * } * else * { * LocalisationLanguageElement langElement = LocalisationController.Instance.Languages[0]; * AddNode(langElement.isoCode, null); * } * } * } */ }
void ChangeSprite(LocalizedSprite sprite) { // When we assign a new AssetReference the system will automatically load the new Sprite asset then call the AssetChanged event. localizeSpriteEvent.AssetReference = sprite; }