Difference between revisions of "Update the Cells"
(Created page with "A") |
|||
Line 1: | Line 1: | ||
A | [[File:Updatecells 1.png|thumb|CellInfo of the cell "Virrihael(0,0)".]] | ||
Updating the [[Cell|Cells]] is a fundamental operation in the RPG Creation Kit that updates all the data that regards the Cell and its content. | |||
In every scene that represent a [[Cell]] there is a special GameObject named '''CellInfo''', that has a '''CellInformation Component''' attached. | |||
This component holds data that regards the content of a Cell in terms of GameObjects and elements of the RPG Creation Kit, such as Doors, [[Mutable|Mutables]], Action Points and Paths. This data is used at runtime and accessed via ID, for example, during the game we can tell an NPC to use the door with ID "''MainDoorToCityInterior''", we translate the '''ID''' to the '''reference''' thanks to the CellInformation script. | |||
Therefore, it is vital to always keep the Cells updated every time we add or remove such objects. | |||
Luckly, doing that is as easy as clicking a button. In the Inspector of every '''CellInfo''' GameObject there will always be a "Update Cell" button. | |||
In addition to that, you can '''automatically update all the cells in a worldspace''' by clicking on the respective button in the Worldspace Inspector: | |||
[[File:Updatecells 2.png|310x310px]] | |||
This is particularly useful when you've edited a lot of cells and don't want to manually load each one of them. | |||
A lot of bugs and errors can be caused by forgetting to update the cells and referencing content inside them, at the same time, they can be quickly fixed by Updating the Cells and [[Databases|Updating the Databases.]] These two actions should be your first go-to whenever you experience an undesired behavior. |
Latest revision as of 22:50, 25 August 2023
Updating the Cells is a fundamental operation in the RPG Creation Kit that updates all the data that regards the Cell and its content.
In every scene that represent a Cell there is a special GameObject named CellInfo, that has a CellInformation Component attached.
This component holds data that regards the content of a Cell in terms of GameObjects and elements of the RPG Creation Kit, such as Doors, Mutables, Action Points and Paths. This data is used at runtime and accessed via ID, for example, during the game we can tell an NPC to use the door with ID "MainDoorToCityInterior", we translate the ID to the reference thanks to the CellInformation script.
Therefore, it is vital to always keep the Cells updated every time we add or remove such objects.
Luckly, doing that is as easy as clicking a button. In the Inspector of every CellInfo GameObject there will always be a "Update Cell" button.
In addition to that, you can automatically update all the cells in a worldspace by clicking on the respective button in the Worldspace Inspector:
This is particularly useful when you've edited a lot of cells and don't want to manually load each one of them.
A lot of bugs and errors can be caused by forgetting to update the cells and referencing content inside them, at the same time, they can be quickly fixed by Updating the Cells and Updating the Databases. These two actions should be your first go-to whenever you experience an undesired behavior.