Unity-Technologies / ProjectAuditor

Project Auditor is an experimental static analysis tool for Unity Projects.
Other
795 stars 64 forks source link

[Feature request] Do not create config if already exists #169

Closed ryagiuchi closed 4 months ago

ryagiuchi commented 1 year ago

Problem statement Not having user control over the location of the config file can be frustrating.

Proposed solution Before creating the config file, check if it already exists in the project. And use it if found.

For instance, ProBuilder does the following when getting a vertex color palette (scriptableobject). https://github.com/Unity-Technologies/com.unity.probuilder/blob/44bd74a35d984b7e3e9ad4b23ad6704d1227c3ea/Editor/EditorCore/VertexColorPalette.cs#L76-L77 https://github.com/Unity-Technologies/com.unity.probuilder/blob/44bd74a35d984b7e3e9ad4b23ad6704d1227c3ea/Editor/EditorCore/FileUtility.cs#L139-L149

I think the following should work, but I'm not familiar with this project so it's just a reference. https://github.com/ryagiuchi/ProjectAuditor/commit/0f0391645fb10a006e7faf2f9f985f1a5f7bc859

Thank you for your consideration.

mtrive commented 1 year ago

I agree. That's a sensible thing to do.

Thanks for reporting.

mtrive commented 4 months ago

This is obsolete now since we don't have a config asset anymore.