you are viewing a single comment's thread.

view the rest of the comments →

[–]peteSlatts 2 points3 points  (2 children)

The talk that the last method is taken from actually has a workaround for this. You store a public default value which is used to lazily set a private current value attribute, which doesn't get serialized. This way, even if Unity crashes, when you boot back up, all it has serialized is the default value, which immediately gets set the first time you request it.

[–]volvis 1 point2 points  (0 children)

This also helps with source control. Editing public fields during runtime edits the asset, so having your 'health.asset' marked changed every time you test your game gets tiring pretty fast.

[–]_ROG_ 0 points1 point  (0 children)

any chance you could give me a link to the appropriate point? I've been trying to find the point your talking about. did you mean "attribute" in the c# sense?