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); }
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(); }
private void Update() { material.SetTexture("_Texture1", texture1.GetTexture()); material.SetTexture("_Texture2", texture2.GetTexture()); material.SetFloat("_BlendingRatio", blendingRatio); }
private void TextureOwner_ChangeTextureEvent(TextureHolderBase sender, Texture texture) { rawImage.texture = textureHolder.GetTexture(); Fit(); }
void Update() { imageFilter.Filter(textureHolder != null ? textureHolder.GetTexture() : null, renderTexture); }
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(); }
// Update is called once per frame void LateUpdate() { rawImage.texture = textureHolder.GetTexture(); }