Unity-Technologies / URDF-Importer

URDF importer
Apache License 2.0
218 stars 71 forks source link

createStlPrefab overwriting existing prefabs #121

Closed robin-moss closed 3 years ago

robin-moss commented 3 years ago

Describe the bug

When unity is started or reimports an STL asset the URDF importer detects we have some STL files in our project (unrelated to any URDFs) and creates a prefab despite one already existing. This overwrites the existing prefab.

To Reproduce

  1. Install URDF importer
  2. Create a folder called assets
  3. Put an STL file in that folder
  4. Use the STL file to create a prefab with material
  5. Put the prefab into the scene
  6. Save all the changes
  7. Select STL assets and Asset -> Reimport
  8. The scene goes very very pink

Git can also be used to see the changes made to the prefab

Console logs / stack traces

Detected an stl file at Assets/.../....stl - creating a mesh prefab.
UnityEngine.Debug:Log (object)
RosSharp.StlAssetPostProcessor:OnPostprocessAllAssets (string[],string[],string[],string[]) (at Library/PackageCache/com.unity.robotics.urdf-importer@d90212e1cd/Runtime/MeshProcessing/StlAssetPostProcessor.cs:39)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets (string[],string[],string[],string[],string[]) (at /home/bokken/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:167)

Expected behavior If a prefab already exists do not overwrite it

Screenshots

Environment (please complete the following information, where applicable):

Additional context

vidurvij-Unity commented 3 years ago

Thank you for bringing this to our attention. I have created a ticket internally to track it. We will update you when this has been patched.

hyounesy commented 3 years ago

ticket#: AIRO-908

hyounesy commented 3 years ago

The existing behaviour of URDF Importer where it was overwriting existing assets in a Unity project has now changed.

As of 0.5: