mirror of
https://github.com/yasirkula/UnityAssetUsageDetector.git
synced 2026-11-19 14:32:37 +08:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cb4454b493 |
@@ -216,6 +216,7 @@ namespace AssetUsageDetectorNamespace
|
||||
{ typeof( AnimatorStateTransition ), SearchAnimatorStateTransition },
|
||||
{ typeof( BlendTree ), SearchBlendTree },
|
||||
{ typeof( AnimationClip ), SearchAnimationClip },
|
||||
{ typeof( TerrainData ), SearchTerrainData },
|
||||
#if UNITY_2017_1_OR_NEWER
|
||||
{ typeof( SpriteAtlas ), SearchSpriteAtlas },
|
||||
#endif
|
||||
@@ -966,6 +967,14 @@ namespace AssetUsageDetectorNamespace
|
||||
return referenceNode;
|
||||
}
|
||||
|
||||
// TerrainData's properties like tree/detail/layer definitions aren't exposed to SerializedObject so use reflection instead
|
||||
private ReferenceNode SearchTerrainData( Object unityObject )
|
||||
{
|
||||
ReferenceNode referenceNode = PopReferenceNode( unityObject );
|
||||
SearchVariablesWithReflection( referenceNode );
|
||||
return referenceNode;
|
||||
}
|
||||
|
||||
#if UNITY_2017_1_OR_NEWER
|
||||
private ReferenceNode SearchSpriteAtlas( Object unityObject )
|
||||
{
|
||||
@@ -1626,6 +1635,11 @@ namespace AssetUsageDetectorNamespace
|
||||
// Ignore "meshFilter" property of TextMeshPro and TMP_SubMesh components because this property adds a MeshFilter component to the object if it doesn't exist
|
||||
else if( propertyName == "meshFilter" && ( currType.Name == "TextMeshPro" || currType.Name == "TMP_SubMesh" ) )
|
||||
continue;
|
||||
// Ignore "users" property of TerrainData because it returns the Terrains in the scene that use that TerrainData. This causes issues with callStack because TerrainData
|
||||
// is already in callStack when Terrains are searched via "users" property of it and hence, Terrain->TerrainData references for that TerrainData can't be found in scenes
|
||||
// (this is how callStack works, it prevents searching an object if it's already in callStack to avoid infinite recursion)
|
||||
else if( propertyName == "users" && typeof( TerrainData ).IsAssignableFrom( currType ) )
|
||||
continue;
|
||||
else
|
||||
{
|
||||
VariableGetVal getter = property.CreateGetter();
|
||||
|
||||
@@ -461,7 +461,10 @@ namespace AssetUsageDetectorNamespace
|
||||
GUILayout.Label( ". . . Search in progress or something went wrong (check console) . . ." );
|
||||
|
||||
if( GUILayout.Button( "RETURN", Utilities.GL_HEIGHT_30 ) )
|
||||
{
|
||||
ReturnToSetupPhase();
|
||||
GUIUtility.ExitGUI();
|
||||
}
|
||||
}
|
||||
else if( currentPhase == Phase.Setup )
|
||||
{
|
||||
@@ -576,7 +579,10 @@ namespace AssetUsageDetectorNamespace
|
||||
GUI.enabled = true;
|
||||
|
||||
if( GUILayout.Button( "Reset Search", Utilities.GL_HEIGHT_30 ) )
|
||||
{
|
||||
ReturnToSetupPhase();
|
||||
GUIUtility.ExitGUI();
|
||||
}
|
||||
|
||||
if( searchResult == null )
|
||||
{
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "com.yasirkula.assetusagedetector",
|
||||
"displayName": "Asset Usage Detector",
|
||||
"version": "2.2.1",
|
||||
"version": "2.2.2",
|
||||
"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