Search Issue Tracker
By Design
Votes
0
Found in
2021.3.25f1
2022.2.20f1
2023.1.0b17
2023.2.0a15
Issue ID
UUM-35592
Regression
Yes
The main object name does not match the asset filename when FileUtil.CopyFileOrDirectory is used
Reproduction steps:
1. Open the attached “ASDQWE” project
2. In the top menu select Test > CopyFile
3. In the Project Window select “Assets/SourceMaterialFolder/FileUtilCopyFileMaterial.mat” material
4. In the Inspector Window observe the material’s name
Expected result: The asset file name matches the main object name (FileUtilCopyFileMaterial)
Actual result: The asset file name (My Test Material) does not match the main object name (FileUtilCopyFileMaterial) and a warning is displayed stating to fix this issue
Reproducible with: 2021.2.0a18, 2021.2.19f1, 2021.3.25f1, 2022.2.20f1, 2023.1.0b17, 2023.2.0a15
Not reproducible with: 2020.3.48f1, 2021.2.0a17
Reproducible on: Intel MacOS 13.3.1
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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
Resolution Note:
Hi,
This situation is expected behavior.
Non-asset-database methods, such as FileUtil.CopyFileOrDirectory(), don't handle assets' internal properties, such as asset names. Meaning, FileUtil.CopyFileOrDirectory() will just do a simple copy of the file.
Regards,
Povilas
Customer QA Team