Reply To: How to create/get properties of groups of data via classes/structs?

FlowCanvas Forums Support How to create/get properties of groups of data via classes/structs? Reply To: How to create/get properties of groups of data via classes/structs?

#1191
swiftillusion
Participant

Ohhh no wonder, now I understand why I could get some things for some reflected classes and not others.
Thanks a lot for the extra example along with the response, the project kit I was trying to reference/branch off for the initial card class usage just had fields and I didn’t realize this difference, that all really helps :).
After trying to research the differences between fields/properties now, even though the reference project is incredibly well done-it appears that using properties from fields is actually the best practice?
Based mostly on this – http://stackoverflow.com/questions/295104/what-is-the-difference-between-a-field-and-a-property-in-c
I realize at this point it can get relatively subjective, and maybe they only used public fields in their classes because those were part of an editor extension, and it looks like properties also need to be declared as serializable for the data to be saved/loaded?
But does this mean, as awesome as the upcoming update with field access sounds, for now I should be instead trying to use class properties instead?
Or as I imagine, would access to fields allow you to easily create the card data in the flowcanvas editor, kind of like how a vector3 has the 3 fields where you just input the information. It looks like setting/getting data properties has its place, but would be extremely clunky for the purpose of card data, especially if wanting to make a list of cards for deck purposes, etc.

If it would be possible to receive access to the new version via my registered email to try out the difference in usage first-hand that’d be an absolute honor and incredibly appreciated :)!