mirror of
https://github.com/yasirkula/UnityAssetUsageDetector.git
synced 2026-11-19 14:32:37 +08:00
Some properties in Project Settings like "Quality Settings->SRP Asset" weren't included in search, fixed
This commit is contained in:
@@ -1021,26 +1021,38 @@ namespace AssetUsageDetectorNamespace
|
||||
SerializedProperty iteratorVisible = so.GetIterator();
|
||||
if( iterator.Next( true ) )
|
||||
{
|
||||
string assetPath = AssetDatabase.GetAssetPath( (Object) referenceNode.nodeObject );
|
||||
bool isProjectSettings = !string.IsNullOrEmpty( assetPath ) && assetPath.StartsWithFast( "ProjectSettings/" );
|
||||
|
||||
bool iteratingVisible = iteratorVisible.NextVisible( true );
|
||||
bool enterChildren;
|
||||
do
|
||||
{
|
||||
// Iterate over NextVisible properties AND the properties that have corresponding FieldInfos (internal Unity
|
||||
// properties don't have FieldInfos so we are skipping them, which is good because search results found in
|
||||
// those properties aren't interesting and mostly confusing)
|
||||
bool isVisible = iteratingVisible && SerializedProperty.EqualContents( iterator, iteratorVisible );
|
||||
if( isVisible )
|
||||
iteratingVisible = iteratorVisible.NextVisible( true );
|
||||
if( isProjectSettings )
|
||||
{
|
||||
// Search Project Settings in full because for some reason, important settings like SRP asset
|
||||
// slot in Quality Settings aren't searched when iterating over only visible properties
|
||||
enterChildren = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Type propFieldType;
|
||||
isVisible = iterator.type == "Array" || fieldInfoGetter( iterator, out propFieldType ) != null;
|
||||
}
|
||||
// Iterate over NextVisible properties AND the properties that have corresponding FieldInfos (internal Unity
|
||||
// properties don't have FieldInfos so we are skipping them, which is good because search results found in
|
||||
// those properties aren't interesting and mostly confusing)
|
||||
bool isVisible = iteratingVisible && SerializedProperty.EqualContents( iterator, iteratorVisible );
|
||||
if( isVisible )
|
||||
iteratingVisible = iteratorVisible.NextVisible( true );
|
||||
else
|
||||
{
|
||||
Type propFieldType;
|
||||
isVisible = iterator.type == "Array" || fieldInfoGetter( iterator, out propFieldType ) != null;
|
||||
}
|
||||
|
||||
if( !isVisible )
|
||||
{
|
||||
enterChildren = false;
|
||||
continue;
|
||||
if( !isVisible )
|
||||
{
|
||||
enterChildren = false;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
ReferenceNode searchResult;
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "com.yasirkula.assetusagedetector",
|
||||
"displayName": "Asset Usage Detector",
|
||||
"version": "1.9.2",
|
||||
"version": "1.9.3",
|
||||
"documentationUrl": "https://github.com/yasirkula/UnityAssetUsageDetector",
|
||||
"changelogUrl": "https://github.com/yasirkula/UnityAssetUsageDetector/releases",
|
||||
"licensesUrl": "https://github.com/yasirkula/UnityAssetUsageDetector/blob/master/LICENSE.txt",
|
||||
|
||||
Reference in New Issue
Block a user