Exemplo n.º 1
0
    private void AddImage(LocalizedSprite s)
    {
        LocalizeSpriteEvent image = Instantiate(imagePrefab, contentRect);

        image.gameObject.SetActive(true);
        image.AssetReference.SetReference(s.TableReference, s.TableEntryReference);
    }
Exemplo n.º 2
0
 public PopUpData(PopUpData data)
 {
     title            = data.title;
     content          = data.content;
     image            = data.image;
     localizedTitle   = data.localizedTitle;
     localizedContent = data.localizedContent;
     localizedImage   = data.localizedImage;
 }
Exemplo n.º 3
0
    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);
         *      }
         *  }
         * }
         */
    }
Exemplo n.º 4
0
 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;
 }