Skip to content

Commit bdfdcc0

Browse files
committed
Merge branch 'develop'
2 parents d336e97 + 9f06f2a commit bdfdcc0

4 files changed

Lines changed: 10 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Change Log
22

3+
## [0.7.1-beta] - Aug 21, 2024
4+
- Amended the exception forwarding of StateMachine to throw the original exception rather than wrapping it. This improves debugging errors in states.
5+
36
## [0.7.0-beta] - Aug 19, 2024
47
- Added support for copy & paste
58

Editor/Utils/StateMachineModelUtils.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Nonatomic.VSM2.NodeGraph;
1+
using System;
2+
using Nonatomic.VSM2.NodeGraph;
23
using Nonatomic.VSM2.StateGraph;
34

45
namespace Nonatomic.VSM2.Editor.Utils
@@ -28,6 +29,9 @@ public static StateMachineModel UpdatePortDataInModel(StateMachineModel model)
2829

2930
public static PortModel UpdateTransitionPortDataFromState(StateNodeModel nodeModel, PortModel currentPortModel)
3031
{
32+
if (nodeModel == null) return currentPortModel;
33+
if (!nodeModel.State) return currentPortModel;
34+
3135
var stateType = nodeModel.State.GetType();
3236

3337
var eventInfo = stateType.GetEvent(currentPortModel.Id);

Runtime/StateGraph/StateMachine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ private async void TriggerAsyncTransition(StateNodeModel nextNode, int frameDela
206206
}
207207
catch (Exception ex)
208208
{
209-
throw new Exception(ex.Message);
209+
throw ex;
210210
}
211211
}
212212

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.nonatomic.visualstatemachinev2",
3-
"version": "0.7.0-beta",
3+
"version": "0.7.1-beta",
44
"displayName": "Visual State Machine V2",
55
"description": "Visual State Machine V2",
66
"unity": "2022.3",

0 commit comments

Comments
 (0)