Compare commits

...

2 Commits

4 changed files with 6 additions and 6 deletions
@@ -153,8 +153,8 @@ namespace AssetUsageDetectorNamespace
} }
// Show the menu item only if there is a selection in the Editor // Show the menu item only if there is a selection in the Editor
[MenuItem( "GameObject/Search for References", validate = true )] [MenuItem( "GameObject/Search for References/This Object Only", validate = true )]
[MenuItem( "GameObject/Search for References (Include Children)", validate = true )] [MenuItem( "GameObject/Search for References/Include Children", validate = true )]
[MenuItem( "Assets/Search for References", validate = true )] [MenuItem( "Assets/Search for References", validate = true )]
private static bool SearchSelectedAssetReferencesValidate( MenuCommand command ) private static bool SearchSelectedAssetReferencesValidate( MenuCommand command )
{ {
@@ -65,7 +65,7 @@ namespace AssetUsageDetectorNamespace
// If this is a scene object, add its child objects to the sub-assets list // If this is a scene object, add its child objects to the sub-assets list
// but don't include them in the search by default // but don't include them in the search by default
Transform goTransform = go.transform; Transform goTransform = go.transform;
Transform[] children = go.GetComponentsInChildren<Transform>(); Transform[] children = go.GetComponentsInChildren<Transform>( true );
for( int i = 0; i < children.Length; i++ ) for( int i = 0; i < children.Length; i++ )
{ {
if( ReferenceEquals( children[i], goTransform ) ) if( ReferenceEquals( children[i], goTransform ) )
@@ -415,8 +415,8 @@ namespace AssetUsageDetectorNamespace
if( typeof( Type ).IsAssignableFrom( type ) || type.Namespace == reflectionNamespace ) if( typeof( Type ).IsAssignableFrom( type ) || type.Namespace == reflectionNamespace )
return true; return true;
// Searching pointer variables for reference throws ArgumentException // Searching pointers or ref variables for reference throws ArgumentException
if( type.IsPointer ) if( type.IsPointer || type.IsByRef )
return true; return true;
return false; return false;
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "com.yasirkula.assetusagedetector", "name": "com.yasirkula.assetusagedetector",
"displayName": "Asset Usage Detector", "displayName": "Asset Usage Detector",
"version": "1.8.5", "version": "1.8.7",
"description": "This editor extension helps you figure out at which places an asset or GameObject is used, i.e. lists the objects that refer to the asset. It is possible to search for references in the Assets folder (Project view) and/or in the scene(s) of your project. You can also search for references while in Play mode!" "description": "This editor extension helps you figure out at which places an asset or GameObject is used, i.e. lists the objects that refer to the asset. It is possible to search for references in the Assets folder (Project view) and/or in the scene(s) of your project. You can also search for references while in Play mode!"
} }