Skip to content

Commit a424e5f

Browse files
PaulDemeulenaerejulienf-unity
authored andcommitted
Fix Mouse Event Binder in player (#175)
* Fix missing call to CreateVFXEventAttribute OnValidate is only called in editor, in runtime, we should init cache data with OnEnable * *Update changelog.md
1 parent 369e2eb commit a424e5f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

com.unity.visualeffectgraph/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1919
- Prevent creation of subgraph containing only partial systems [Case 1284053](https://issuetracker.unity3d.com/product/unity/issues/guid/1284053/)
2020
- Fix [Case 1223747](https://fogbugz.unity3d.com/f/cases/1223747/)
2121
- Prevent pasting context within operator/block subgraph [Case 1235269](https://issuetracker.unity3d.com/product/unity/issues/guid/1235269/)
22+
- VFXEventBinderBase throwing a null reference exception in runtime
2223

2324
## [10.2.0] - 2020-10-19
2425
### Added

com.unity.visualeffectgraph/Runtime/Utilities/EventBinding/VFXEventBinderBase.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,17 @@ abstract class VFXEventBinderBase : MonoBehaviour
1313
[SerializeField, HideInInspector]
1414
protected VFXEventAttribute eventAttribute;
1515

16+
protected void OnEnable()
17+
{
18+
UpdateCacheEventAttribute();
19+
}
20+
1621
private void OnValidate()
22+
{
23+
UpdateCacheEventAttribute();
24+
}
25+
26+
private void UpdateCacheEventAttribute()
1727
{
1828
if (target != null)
1929
eventAttribute = target.CreateVFXEventAttribute();

0 commit comments

Comments
 (0)