mirror of
https://github.com/yasirkula/UnityAssetUsageDetector.git
synced 2026-11-20 23:12:38 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8e7369e44e |
@@ -1021,26 +1021,38 @@ namespace AssetUsageDetectorNamespace
|
|||||||
SerializedProperty iteratorVisible = so.GetIterator();
|
SerializedProperty iteratorVisible = so.GetIterator();
|
||||||
if( iterator.Next( true ) )
|
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 iteratingVisible = iteratorVisible.NextVisible( true );
|
||||||
bool enterChildren;
|
bool enterChildren;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
// Iterate over NextVisible properties AND the properties that have corresponding FieldInfos (internal Unity
|
if( isProjectSettings )
|
||||||
// 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)
|
// Search Project Settings in full because for some reason, important settings like SRP asset
|
||||||
bool isVisible = iteratingVisible && SerializedProperty.EqualContents( iterator, iteratorVisible );
|
// slot in Quality Settings aren't searched when iterating over only visible properties
|
||||||
if( isVisible )
|
enterChildren = true;
|
||||||
iteratingVisible = iteratorVisible.NextVisible( true );
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Type propFieldType;
|
// Iterate over NextVisible properties AND the properties that have corresponding FieldInfos (internal Unity
|
||||||
isVisible = iterator.type == "Array" || fieldInfoGetter( iterator, out propFieldType ) != null;
|
// 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 )
|
if( !isVisible )
|
||||||
{
|
{
|
||||||
enterChildren = false;
|
enterChildren = false;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ReferenceNode searchResult;
|
ReferenceNode searchResult;
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "com.yasirkula.assetusagedetector",
|
"name": "com.yasirkula.assetusagedetector",
|
||||||
"displayName": "Asset Usage Detector",
|
"displayName": "Asset Usage Detector",
|
||||||
"version": "1.9.2",
|
"version": "1.9.3",
|
||||||
"documentationUrl": "https://github.com/yasirkula/UnityAssetUsageDetector",
|
"documentationUrl": "https://github.com/yasirkula/UnityAssetUsageDetector",
|
||||||
"changelogUrl": "https://github.com/yasirkula/UnityAssetUsageDetector/releases",
|
"changelogUrl": "https://github.com/yasirkula/UnityAssetUsageDetector/releases",
|
||||||
"licensesUrl": "https://github.com/yasirkula/UnityAssetUsageDetector/blob/master/LICENSE.txt",
|
"licensesUrl": "https://github.com/yasirkula/UnityAssetUsageDetector/blob/master/LICENSE.txt",
|
||||||
|
|||||||
Reference in New Issue
Block a user