Version: 2021.3
언어: 한국어

AssetDatabase.UnregisterCustomDependencyPrefixFilter

매뉴얼로 전환
public static uint UnregisterCustomDependencyPrefixFilter (string prefixFilter);

파라미터

prefixFilter Prefix filter for the custom dependencies to unregister.

반환

uint Number of custom dependencies removed.

설명

Removes custom dependencies that match the 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); } }