prefixFilter | 要取消注册的自定义依赖项的前缀过滤器。 |
uint 已移除的自定义依赖项数量。
移除与 prefixFilter 匹配的自定义依赖项。
using UnityEngine; using UnityEditor; using UnityEngine.Assertions; public class CustomDependenciesExample { public static void AddAndRemoveCustomDependencies() { // Example to to illustrate how UnregisterCustomDependencyPrefixFilter works. Not a useful scenario. AssetDatabase.RegisterCustomDependency("MyDependencySystem/DepA", Hash128.Compute("Hello")); AssetDatabase.RegisterCustomDependency("MyDependencySystem/DepB", Hash128.Compute("World"));
var unregistered = AssetDatabase.UnregisterCustomDependencyPrefixFilter("MyDependencySystem/"); Assert.AreEqual(2, unregistered); } }