Via the cell component's CellTypeOverride property, where you'd assign the cell type's settings (or null to reset it). E.g. if you have the asset of the cell type, you can do it like this: cell.CellTypeOverride = cellTypeAsset.Settings; cell is a BattleGridCellComponent and cellTypeAsset a BattleGridCellTypeAsset.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Well, the cellTypeAsset is just that, the asset of the cell type you want to use. If you're talking about ORK's dropdown settings to select those, they have the asset available as StoredAsset property, e.g.: BattleGridCellTypeAsset cellTypeAsset = yourPopupField.StoredAsset;
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Thank you for the answer. We found a different solution that also worked.
What we ended up doing is using a CellTypeOverride to apply the settings from the BattleGridCellType prefab we want the cell to turn into. Seems to work fine.
E.g. if you have the asset of the cell type, you can do it like this:
cell.CellTypeOverride = cellTypeAsset.Settings;
cell is a BattleGridCellComponent and cellTypeAsset a BattleGridCellTypeAsset.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
How do I change the cellTypeAsset.Settings (to another element from the dropdown) from another script (after finding the cell by name)?
For example, I want to change a cell from ground to blocked from another script.
BattleGridCellTypeAsset cellTypeAsset = yourPopupField.StoredAsset;
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
What we ended up doing is using a CellTypeOverride to apply the settings from the BattleGridCellType prefab we want the cell to turn into. Seems to work fine.