Cannot replace default anim state in graph

It is currently impossible to change the default state in an AnimStateGraph to another state.

To test:

  • create an AnimStateGraph and enter the editor
  • create a default state
  • create a transition from the Start node to the state
  • create a new state
  • try to create a transition from the Start node to the new state without deleting the linked state

It is set up so:

  • you cannot remove the transition from Start to a State (there is no delete option on this transition)
  • you cannot create a new transition from Start to a different State

Why is this a problem?

I can’t make the ‘idle’ transition interruptable because that option is greyed out on the transition from Start. So my next thought is to create a non-looping First state which plays the idle once, then transition to the Idle state with the interruptable option enabled.
Because that old one cannot be unlinked, I will have to manually copy every transition that is going to ‘Idle’ to the new state (and of course rename ‘idle’ as ‘first’ and change which one is looping). Phew!

EDIT: removed some details that were based on my misunderstanding of the ‘exit time’ mechanism. I think the issue still has merit even though I didn’t need it on this occasion :wink:

A separate suggestion:
The ‘time’ field in animation events should be normalized time. It’s currently nearly impossible to trigger at (normalized) 1.0.

Hi @PeteB!

Maybe my GitHub issue is related? It’s closed, but you can read some suggestions in it. For example you cannot remove the initial state, but you can choose another initial state.

Please also note that you now can have an empty state and use this state as a switch to all other states.

You also can create an Anim State Graph without transitions and switch manual by script to the correct state.

Please let me know if this helps you.

Hi @albertos

thanks for the reply. It does not address my initial issue which is that there is no way to substitute the state connected to ‘start’ with the new ‘empty state’ that you suggest. (That’s what I was trying to do myself)

EDIT: the connected github issue is similar but not the same. In that issue you wanted to eliminate the start state, I don’t want to eliminate it, I just want to swap it for a different one.

EDIT2: I went back to that thread and read it more carefully - I believe that yaustar is saying that it can be changed in ‘stategraph properties’. I haven’t looked at those properties yet, but assuming that’s correct (I’m sure it is!) I would ask: why is this one different to every other transition? Why can’t we have a delete button on the transition? When the graph is created that start node is not connected to anything, and it is easy to notify the user that their graph will not work if the connection is missing.

The reason is because there can never be no transition from start to another state. There must always be one and this is the UX that was chosen to ensure this

1 Like