Skip to content

Bug Fixes and Method Validation

Choose a tag to compare

@brunomikoski brunomikoski released this 09 May 19:35
· 454 commits to master since this release
2a4d0a9

Changed

  • Fix issue where entering in playmode with a missing collection reference in the CollectionRegistry would throw a nullref and not reload collections
  • Added new condition to consider an item as a "Bad Item" and for it to be cleared. This fixed an edge case where a collection can have a non existing item but it is not being cleared out from the collection
  • Added validation method as an CollectionItemEditorOptions option, you can now define a method to validate what CollectionItem can appear, like this:
[SerializeField, CollectionItemEditorOptions(ValidateMethod = nameof(IsValidConsumable))]
private Consumable onlyUnlockedHardCurrency;

public bool IsValidConsumable(Consumable consumable)
{
    if (consumable is HardCurrency hardCurrency)
        return hardCurrency.IsUnlocked;
    return true;
}