I found some issue of NodeCanvas. but I guess you need to see and modify it.
1. Serialization of enum for bit flags can’t work properly. we tested it as screen shot. In my opinion, there are two ways to solve it.
– make editor as custom for enum like “LayerMaskField” method in EditorUtils class.
– or using CustomPropertyDrawer as second screen shot.
2. BBParameter.cs, around of 309 line, about log events “Parameter ‘{0}’ (of type ‘{1}’) promoted…..” I saw that code in NodeCanvas, all log events have on/off switch except 309 line of BBParameter.cs, as you know It can be a performance issue in release when we use dynamic value. so I guess all log events need to on/off switch.
In the latest version of NC available, flags enums are supported and shown correctly. The inspector is using Unity’s 5.x EnumMaskPopup. What version of NodeCanvas and Unity are you using?
Regarding the “variable promoted” logs, I intentionally made them to always show, because I think they are very important. I will though wrap the log in an #if UNITY_EDITOR so that it doesn’t come in the build. You are correct in that 🙂
Please let me know about the flags enum issue.
Thanks!
Yeah, I know that editor code. but try it as irregular number like
[System.Flags]
enum Flag
{
Seven << 1
Bar << 2
Hello << 20
}
and I know It does work with editor when we just set it up. But if we want to save that value in prefab or FSM, BehaviourTree of Json file, than, you won’t see the “Hello” enum value. It will not be saved in the file (prefab, blabla.asset(FSM asset). So weird
Okay, I tell you what I found about enum flag step by step.
1. Create FSM with GraphOwner
2. Create TestAction in FSM what we created.
3. Change value as Hello of enum value in TestAction
4. and save it as asset named “sampleFSM.asset” in project folder
5. open the “sampleFSM.asset” in text editor.
5. you will find the weird behaviour of serialization.