Construct requires a minimum of one instance of every object type in a project to exist in a layout, with noted exceptions such as Input plugins, Function, Arrays, Dictionary, etc. Each first instance of an object type in Construct determines the default properties for new instances subsequently created either *through the editor* or *through the "Create Object / Spawn Object" action* at runtime.
Since there are many situations where an object might not exist until later in the game (created "on demand" through event code), most developers create a blank "Asset Layout" where each prototype object can be placed. When a project is first opened by Construct, it stores a "prototype instance" of each Object Type in memory. Unless a developer is familiar with the internal operation of how these prototype instances are stored, confusion can result.
From extensive testing, the prototype instance of some object (A) is simply the first XML element of the instance on the first layer (bottom-most layer in the Layout editor) of the first layout (ordered from top to bottom in the Project Window Layout List -- this matches the layout order in the CAPROJ xml file) encountered that contains an instance of the object parsed by Construct.
Until a project is reloaded, the prototype instance assignment will not change. Even if you delete the prototype instance, Construct will continue to base new *EDITOR* instances on its properties/values. However, Construct on preview will always reparse layouts for the first prototype instances of all object types, which affects creation/spawn at run-time.
Users browsing this forum: No registered users and 0 guests