There're two problems right now:
- If we put a Visual in the VisualC the .json file gets huge, because basicly the whole model gets stored in there. And to deserialize every object needs a non-parameter Constructor, which is impossible if we use 3rd party stuff. To pass this problem i gave the VisualC a string instead of a visual and it should generate a Visual once created and store itself in the Visual.visualcs. There comes the second problem...
- Because the visual has to create his visual itself based on the modeltype-string, i had to impelemt an Init()-function which gets called after the deserialize, because while deserialize (on constructor-call) i don't have the modeltype yet. (In deserialzisation the fields get their values AFTER making the new instance of the object).
But now we have a function in the component. Which you wanted to get rid of in the first place.
So do you allow one Init()-function in some components or do you want to make some kind of Info-class again? Which i don't want.
There're two problems right now:
But now we have a function in the component. Which you wanted to get rid of in the first place.
So do you allow one Init()-function in some components or do you want to make some kind of Info-class again? Which i don't want.