AssetList Refresh

Issue #464 open
Myles Lambert created an issue

When using a custom filter on an AssetList that is affected by other parameters in the inspector there should be a way to force the AssetList to refresh to reflect the changes to the filter.

Comments (7)

  1. mSkull001

    Isn't there already a refresh button on the asset list GUI? Or do you want a way to trigger a refresh automatically when other properties change?

  2. Petey Mainardi

    Is it currently possible to trigger a refresh on an AssetList through code when another property changes?

  3. Mehmet Can Kahraman

    I have made an asset list with single object and its filter method BinaFiltrele checks for inspector values. But when inspector values are changed, there is no way to refresh the list.

    [AssetList(AutoPopulate = true,Path="Sehir/Fantastic",CustomFilterMethod = nameof(BinaFiltrele))] [InlineEditor(InlineEditorModes.LargePreview)]
        public GameObject bina;
    

  4. Jonell Bagayan

    Anyone who knows the way to refresh Asset List in the code (not with the button that exist on the GUI of it)?

  5. Antoine Dominguez

    Got the same issue. Is there any workaround to force a refresh on the AssetList ?

    [SerializeField]
    DataClassProperty classProperty;
    
    [SerializeField, AssetList(CustomFilterMethod = nameof(IsPropertyClassMap))]
    DataClassMap dataClassMap;
    
    bool IsPropertyClassMap(DataClassMap dataClassMap)
    {
        return dataClassMap.DataClass.TypeName == classProperty.TypeName;
    }
    

    When classProperty changes, the Asset List is not refreshed.
    Would be great to fix this bug because it makes impossible to use the AssetList in this use case.

  6. Log in to comment