Search Issue Tracker
By Design
Won't Fix in 5.5.X
Votes
11
Found in
4.6.1f1
Issue ID
667026
Regression
No
AssetDatabase.GetDependencies returns unused texture
To reproduce:
1. Open attached example project (Assets/scene.scene).
2. Select "Assets/material" in the project.
3. Notice the material is using a Diffuse shader that references "Assets/texture_green.png".
4. Execute from the main menu "BugReport > AssetDatabase.GetDependencies (broken)"
5. Observe that the is outputs to the Console window that the material is using texture_red.png, even so it does not use texture_red.png.
Comments (2)
-
Tritaru
Jun 29, 2019 23:43
This is an insult to the developer who took the time to report this, and the community deserves a much better explanation as to why this is happening if it is to be marked as "By Design." The smug response in the resolution note proudly avoids explaining why the texture is being referenced by the material (something the community clearly thinks isn't the case) and discourages future bug reporting and interaction with the site. Bad design happens when the expected action and the resulting behaviour deviate.
-
Peter77
May 17, 2017 05:36
I imagine this issue is related to:
https://issuetracker.unity3d.com/issues/textures-removed-from-shaders-are-still-collected-as-dependencies
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Shader Graph Swizzle Node Input/Output and Mask Update Incorrectly After Undo
- [URP] Crash on GameObject::QueryComponentByType when baking a Reflection Probe in an unsaved/untitled Scene
- No Icons are used for the Entry and Exit States in the Inspector when selected in an Animator Controller
- Crash on PlayerMain(int, char const**) when exiting Standalone Player with a Particle System in the Scene
- No Icon is used for the Runtime Animator Controller Type in a Search Window when assigning an Animator Controller in the Animator Component
Resolution Note (2019.2.X):
Note that this function returns all assets that are referenced by the input asset; these references are not necessarily required during the build process.