TCastleTransformDesign allow you to instantiate (reuse) in one design file a component designed in another design file. This is similar to how Unity prefabs are used.
If you like to learn by watching, we have a nice video about using these components:
The general idea is simple:
You can reuse a composition of components, that you have designed in CGE editor, multiple times.
You can reuse a UI (
TCastleUserInterface). Reuse by
You can reuse a transform (
TCastleTransform - 3D or 2D stuff that can be placed in a viewport). Reuse by
Any design file (
.castle-transform) can be loaded (instantiated) by
TCastleTransformDesign). To create such design file, with any component as a root, you can use:
Menu item "Design → New Xxx (Custom Root) → Xxx"
Or save any component to file using "Save Selected…" command (right-click on the component in hierarchy).
Then you can reuse it:
by manually adding
TCastleTransformDesign to new designs. Set their
URL property to the design that contains the component to be reused.
Or just drag-and-drop a
.castle-transform file on your design.
See the context menu (right-click) of the
TCastleTransformDesign for some helpful commands:
"Edit (Copy Here) Referenced Design" (detach from the referenced design file)
"Revert To Referenced Design" (use after "Edit (Copy Here) Referenced Design"; this removes all the children and reverts back to the original design file)
"Open Referenced Design" (an easy way to open design in the
URL of this
To improve this documentation just edit the source of this page in AsciiDoctor (simple wiki-like syntax) and create a pull request to Castle Game Engine WWW (cge-www) repository.
Copyright Michalis Kamburelis and Castle Game Engine Contributors.
This webpage is also open-source and we welcome pull requests to improve it.