Beispiel #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);
        }
Beispiel #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();
        }
Beispiel #3
0
 private void Update()
 {
     material.SetTexture("_Texture1", texture1.GetTexture());
     material.SetTexture("_Texture2", texture2.GetTexture());
     material.SetFloat("_BlendingRatio", blendingRatio);
 }
Beispiel #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);
 }
Beispiel #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();
 }
Beispiel #8
0
 // Update is called once per frame
 void LateUpdate()
 {
     rawImage.texture = textureHolder.GetTexture();
 }