What are external layouts?

What are external layouts and what are their uses?

Effectively they are scenes without attached event code. They define the layout of the objects.

When external layouts are be loaded into the current scene, all their objects will be added to the current scene, and the events of the current scene will apply to these added objects.

They’re good for placing objects that appear in multiple scenes, like an HUD or health & score or an inventory or a frame that surrounds the playing area, You could place these in every one of your game scenes. But a slight change to layout would mean updating every scene. Using an external layout would mean changing only in one place.

Another use for them is for games with many levels. Instead of creating loads of scenes and repeating the same event code, you have one base scene with event code applicable all levels. The base scene adds the object from the external layout, and the events apply to all the objects as if they were originally in the scene.

HTH

6 Likes

@MrMen Thank you for this…