0
Scheduled

Refactoring attribute(s)

Lazlo Bonin (Lead Developer) 2 months ago • updated by Ed WonWon 2 months ago 3 1 duplicate

An attribute to specify old names for refactored types and members should be provided.

This should hook deeply in FullSerializer to reroute the serialization in case of failure.

For example, a type that changed name or namespace could be labelled like to:

[FormerlySerializedAs("OldType")]
public class NewType { ... }


Duplicates 1

Under Review

Hi Ed,

I'm aware of the issue, but a dialog like that is not possible for Bolt unless I'm mistaken.

Bolt looks for types during deserialization, which is a special first frame operation in the Unity system in which no other Unity API method or property is allowed to be called (including, for example, an editor window). 

What I'm currently considering to go around that limitation is an attribute like [FormerlySerializedAs]. For example, you can mark your new enum type:

[FormerlySerializedAs("MyNamespace.OldEnumType")]
public enum NewEnumType { ... }

Regarding the slow down, it's hard to tell what is happening from your report. Are you getting this warning repetitively or just once?

The warning was only happening once, but I drilled down into the editor profiler and the slowdown was definitley from ludiq serialization of some kind.

Unfortunately we've actually given up on using Bolt for our project for now. We love the UI and many of the features of the plugin, especially the way transitions are handled, and the way state machines and flow graphs can be mixed. 

However, the lack of source code, an "any state" state, the massive size of the plugin after all the generated files are created, and the slow down when hitting play in the editor, all of these issues made us realize the plugin isn't quite mature enough for a shipped game.