in Engine

Castle Game Engine: Big update to “Custom Components” documentation, critical localization fix

From Castle Game Engine: link to original post

Custom component in CGE editor

I have extended the Custom Components documentation, to serve as a good overview for people who want to create new components that are registered in CGE editor.

  1. Nicer introduction and consolidates important information from other pages,

  2. Documented publishing classes: using subcomponents, references, observing them using TFreeNotificationObserver

  3. Documented when and why you should use SetTransient

  4. There’s also a description of new TSerializationProcess features: (De)Serializing other values (not just published properties). This is preliminary, i.e. the feature is not yet available on master, only on new-cameras branch.

    TSerializationProcess was extended to allow you to read/write custom instances and simple types (integer, string, boolean, single) and vectors/colors to design file. This allows to

    1. have internal information (not published, may be even private) that is still serialized/deserialized (use-case: storing design-time camera and navigation params in editor),

    2. have backward compatibility for old designs by reading an old property name from file, and converting it to new property immediately. This allows to remove old property names from code, but still support it for file reading.

We also fixed a critical localization bug. And added auto-tests so that the bug will never return 🙂