示例#1
0
    private bool IndexValid(byte index)
    {
        foreach (var asset in EditModeUtility.FindAssetsOfType(AssetType))
        {
            if (!(asset is CardModel model))
            {
                return(false);
            }

            if (model.qrLink == qrLink)
            {
                continue;
            }
            if (model.index == index)
            {
                return(false);
            }
        }
        return(true);
    }
示例#2
0
 private bool IsResultatTypeDuplicate(TypeNote typeNote) =>
 sommeil != null && EditModeUtility.FindAssetsOfType <ResultatModel>()
 .Where(x => x.sommeil == sommeil && x.GetInstanceID() != GetInstanceID())
 .Any(x => x.noteCarnet.typeNote == typeNote);