void Start()
        {
            FindComponent();

            if (ISILocalization.LoadIfNotInScene())
            {
                Infinity.When(() => ISILocalization.IsInitialized, _OnLanguageChanged);
            }

            if (LocalizedStrings == null)
            {
                LocalizedStrings = new List <LocalizedString>();
            }

            if (!LocalizedStrings.Contains(this))
            {
                LocalizedStrings.Add(this);
            }
        }
예제 #2
0
        void Start()
        {
            if (type == SpriteComponentType.Image)
            {
                image = GetComponent <Image>();
                if (image == null)
                {
                    Debugger.LogError("There is no Image component attached to this GameObject", gameObject);
                    return;
                }
            }
            else
            {
                spriteRenderer = GetComponent <SpriteRenderer>();
                if (spriteRenderer == null)
                {
                    Debugger.LogError("There is no SpriteRenderer component attached to this GameObject", gameObject);
                    return;
                }
            }

            if (ISILocalization.LoadIfNotInScene())
            {
                Infinity.When(() => ISILocalization.IsInitialized, _OnLanguageChanged);
            }

            if (LocalizedSprites == null)
            {
                LocalizedSprites = new List <LocalizedSprite>();
            }

            if (!LocalizedSprites.Contains(this))
            {
                LocalizedSprites.Add(this);
            }
        }