Пример #1
0
        public void Export()
        {
            SecureTextures(textureHolder.GetTexture());
            var name = (string.IsNullOrEmpty(prefix) ? string.Empty : prefix + "_") + (useDateTime ? TypeUtils.Format.DateTime2String(DateTime.Now) : string.Empty);

            if (string.IsNullOrEmpty(name))
            {
                Debug.LogError("file name is empty.");
            }
            var fileName = name + "." + imageType.ToString();
            var path     = Path.Combine(Application.streamingAssetsPath, directoryName, fileName);

            textureUtilBehaviour.SaveTexture(path, imageType, textureHolder.GetTexture(), texture, renderTexture);
        }
Пример #2
0
        public void Init(string label, TextureHolderBase textureHolder, Vector2 size)
        {
            var rectTransform = GetComponent <RectTransform>();

            this.label.text    = label;
            rawImage.texture   = textureHolder.GetTexture();
            this.textureHolder = textureHolder;
            this.size          = size;
            textureHolder.TextureInitializedEvent += TextureOwner_ChangeTextureEvent;

            Fit();
        }
Пример #3
0
 private void Update()
 {
     material.SetTexture("_Texture1", texture1.GetTexture());
     material.SetTexture("_Texture2", texture2.GetTexture());
     material.SetFloat("_BlendingRatio", blendingRatio);
 }
Пример #4
0
 private void TextureOwner_ChangeTextureEvent(TextureHolderBase sender, Texture texture)
 {
     rawImage.texture = textureHolder.GetTexture();
     Fit();
 }
 void Update()
 {
     imageFilter.Filter(textureHolder != null ? textureHolder.GetTexture() : null, renderTexture);
 }
Пример #6
0
 void Update()
 {
     renderTexture = textureUtilBehaviour.SecureTexture(textureHolderBase.GetTexture(), renderTexture);
     Graphics.Blit(textureHolderBase.GetTexture(), renderTexture);
 }
 // Update is called once per frame
 void LateUpdate()
 {
     renderer.material.mainTexture = textureHolder.GetTexture();
 }
Пример #8
0
 // Update is called once per frame
 void LateUpdate()
 {
     rawImage.texture = textureHolder.GetTexture();
 }