Skip to content

Commit f27b3c0

Browse files
author
Takashi Sakai
authored
Merge pull request #37 from mob-sakai/hotfix
Release 1.5.1
2 parents 2d46d47 + 7779af8 commit f27b3c0

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

Assets/UIEffect/Readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ Please enable `TexCoord1` to use UIEffect.
137137

138138
## Release Notes
139139

140+
### ver.1.5.1
141+
142+
* Fixed: An error occurs when no effect is specified for UICapturedImage. [#36](https://github.com/mob-sakai/UIEffect/issues/36)
143+
144+
140145
### ver.1.5.0
141146

142147
* Feature: Add ToneMode `Hue Shift`.

Assets/UIEffect/UIEffectCapturedImage.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,9 @@ public void Capture()
175175
Material mat = effectMaterial;
176176

177177
_buffer = new CommandBuffer();
178-
_buffer.name = mat.name;
179-
_rt.name = mat.name;
178+
_buffer.name =
179+
_rt.name =
180+
mat ? mat.name : "noeffect";
180181

181182
// Copy to temporary RT.
182183
_buffer.GetTemporaryRT(s_CopyId, -1, -1, 0, FilterMode.Bilinear);
@@ -194,6 +195,7 @@ public void Capture()
194195
if (!mat)
195196
{
196197
_buffer.Blit(s_CopyId, rtId);
198+
_buffer.ReleaseTemporaryRT(s_CopyId);
197199
}
198200
// Blit with reduction buffer.
199201
else if (m_DesamplingRate < m_ReductionRate)

UIEffect.unitypackage

-36 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)