public int GetValueCount(Guid guid, IEnumerable <string> possibleNames, IAssetValue assetValue)
        {
            myShellLocks.AssertReadAccessAllowed();

            var count = 0;

            foreach (var name in possibleNames)
            {
                var mbField = new MonoBehaviourField(guid, name.GetPlatformIndependentHashCode());
                count += myUniqueValuesCount.GetCount(mbField, assetValue.GetHashCode());
            }

            return(count);
        }
Exemple #2
0
        public void Drop(IPsiSourceFile currentAssetSourceFile,
                         AssetDocumentHierarchyElement assetDocumentHierarchyElement,
                         IUnityAssetDataElement element)
        {
            if (!(element is AnimationUsagesDataElement animationElement))
            {
                return;
            }
            foreach (var @event in animationElement.Events)
            {
                var functionName = @event.FunctionName;
                var guid         = @event.Guid;
                var currentCount = myNameToGuids.GetCount(functionName, guid);
                if (currentCount != 0)
                {
                    myNameToGuids.Remove(functionName, guid);
                }
                myUsageToSourceFiles.Remove(Pair.Of(functionName, guid), currentAssetSourceFile);
            }

            myPointers.Remove(currentAssetSourceFile);
        }
 public int GetValueCount(MonoBehaviourProperty query, object value)
 {
     return(myUniquePropertyValues.GetCount(query, new MonoBehaviorPropertyValueBox(value)));
 }