Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Unity replaces first character of filenames of imported files with an underscore

Discussion in 'Getting Started' started by DanWef, Oct 30, 2020.

  1. DanWef

    DanWef

    Joined:
    Jun 4, 2020
    Posts:
    27
    Hi! If I import a file with the name "hello.png" Unity imports it as "_ello.png". How can I solve this problem? This happens to all kind of filetypers from all locations. Thx
     
    mrmcduck, ethanicus, sama-van and 3 others like this.
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,796
    Please describe your platform, including OS and disk format.
     
  3. DanWef

    DanWef

    Joined:
    Jun 4, 2020
    Posts:
    27
    Im using Windows 10 64-Bit, Unity Version 2020, disk format is NTFS. Im developing for iOS
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,825
    Can you show an example? I've never seen this.
     
  5. DanWef

    DanWef

    Joined:
    Jun 4, 2020
    Posts:
    27
    If you import "Intro.png" unity imports "_ntro.png"
     
  6. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,796
    Not for us, it doesn't. It's got to be something weird on your system. What do the file and meta file look like in File Explorer after Unity's touched it?
     
  7. kamen_rila

    kamen_rila

    Joined:
    Nov 2, 2020
    Posts:
    2
    It does the same thing for me.. Unity 2020.1.11, on MacOs, every file that I import gets it's first letter replaced with an underscore?!?!?
     
    pavelmo4alov and DanWef like this.
  8. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,796
    Is it actually renaming the files, or does it just appear that way in Unity?
     
  9. DanWef

    DanWef

    Joined:
    Jun 4, 2020
    Posts:
    27
    It's just renaming the files in unity. The orignal files stay the same.
     
  10. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,796
    I guess the next step is to file a bug report. That's a really strange one for sure.
     
    Joe-Censored likes this.
  11. lcompton

    lcompton

    Joined:
    Mar 31, 2018
    Posts:
    52
    I'm having the same problem using 2020.1.11 on Windows 10. If I drag and drop a file from Windows Explorer to Unity, the first character is changed to "_". Note that if I drag and drop a directory, only the directory name is changed. The underlying files have the correct names.
     
  12. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,796
    Wait, why are you dragging and dropping files from Windows Explorer to Unity? I have never done that in my life.

    The way I add a file to a Unity project is, I just drag the file in to wherever I want it to live under the Assets folder, right in File Explorer (or Finder on Mac). If you try it this way, does it go any better?
     
    Joe-Censored likes this.
  13. iMobCoding

    iMobCoding

    Joined:
    Feb 13, 2017
    Posts:
    146
    Ok I can confirm this too in v2020.1.11

    - If you drag/drop a file to Unity Asset folder while in Unity Editor, it gets renamed by replacing first characher with _. It's not just the name in Unity, file is actually renamed in Unity Asset folder too

    - If you drag/drop file to Unity Asset folder directly and then switch to Unity Editor, file stays the same...
     
  14. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,825
    I also have never done this, and frankly didn't know it even could. Just do it all in File Explorer or equivalent, then focus the Editor and it starts importing.

    I'd recommend people who are having this issue to file a bug report, and use the above as a work around.
     
    dog_funtom, tetriser016 and JoeStrout like this.
  15. tetriser016

    tetriser016

    Joined:
    Jan 3, 2014
    Posts:
    100
    Happened to me as well, using the latest version (2020.1.11f)
    Though I can confirm it happened only when dropping from the file manager to the editor
     
  16. andkadow

    andkadow

    Joined:
    Oct 19, 2020
    Posts:
    1
    Same here!!!
     
  17. Qhuhuit

    Qhuhuit

    Joined:
    Feb 17, 2018
    Posts:
    36
    Same issue here with 2020.1.11f & 2020.1.12f, windows 10, and it is renaming the file on disk too...
    Already searched for any "AssetDatabase.RenameAsset" in my code base but nothing should do this!
     
  18. FVS

    FVS

    Joined:
    Aug 10, 2015
    Posts:
    40
    same issue here, did anyone file a report so I can vote?
     
  19. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    We are looking into this, engineering is aware. No ETA and no link yet on issue tracker but I entered a comment referring to this thread.
     
    PraetorBlue, eugeneloza and JoeStrout like this.
  20. maengkom

    maengkom

    Joined:
    Dec 15, 2014
    Posts:
    8
    same...
     
  21. canmujde

    canmujde

    Joined:
    Oct 16, 2018
    Posts:
    4
    Same thing happening. Anyone found a solution?
     
  22. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    There is a workaround described in this thread, have you tried it? I admit that I haven't seen the issue.
     
    PraetorBlue and Joe-Censored like this.
  23. rnchell

    rnchell

    Joined:
    Feb 26, 2020
    Posts:
    1
    Same thing happens for me (Unity 2020.1.13f1).
    Dragging and dropping files into Editor replaces the first letter of each file with an underscore.
    However, dragging and dropping a folder will replace first letter of folder name with underscore, but filenames inside of the folder remain intact.
    Using Asset -> Import New Asset works as expected.
     
  24. Chico3001

    Chico3001

    Joined:
    Mar 10, 2018
    Posts:
    8
    Same problem here... Im using Unity 2020.1.11 on Windows 10 Pro
     
  25. Dreamer

    Dreamer

    Joined:
    Mar 8, 2011
    Posts:
    67
    Same issue. Introduced in a version at least weeks ago, and since then it always occurs for a couple of versions. Shocked they still haven't fixed it.
     
  26. arnedirlelwy

    arnedirlelwy

    Joined:
    Oct 4, 2019
    Posts:
    3
    Any update on a fix for this? It is quite a pain as any Variants I have setup that I try and import a new model for need to be completely re set up if the name changes on import.
     
  27. Chico3001

    Chico3001

    Joined:
    Mar 10, 2018
    Posts:
    8
    What i do is to right click the folder where i want to import the assets and select "Show in Explorer" then drag and drop directly using windows explorer, then change to unity and wait for it to finish importing
     
    arnedirlelwy likes this.
  28. kamen_rila

    kamen_rila

    Joined:
    Nov 2, 2020
    Posts:
    2
    Pretty shocked that this still haven't been fixed. Using version 2020.1.13f and still happening? What exactly is your QA team doing?!?
     
    dog_funtom likes this.
  29. Echoshard1

    Echoshard1

    Joined:
    Nov 26, 2013
    Posts:
    4
    My team was having the same problems I submitted a bug report with a video of what happens
     
  30. yodamaycry

    yodamaycry

    Joined:
    Oct 18, 2019
    Posts:
    3
    Thank God, Same here... windows explorer to project folder... thought my computer was _roke
     
    Raptosauru5 likes this.
  31. alkannyunus

    alkannyunus

    Joined:
    Jul 6, 2020
    Posts:
    19
    Same here Unity 2020.1.12f1
     
  32. Echoshard1

    Echoshard1

    Joined:
    Nov 26, 2013
    Posts:
    4
  33. Peyot

    Peyot

    Joined:
    Mar 27, 2013
    Posts:
    6
    Same on Mac OS Catalina and Big Sur. 2020.1.11f1. Upvoted the issue.
     
  34. studentsimf

    studentsimf

    Joined:
    Dec 18, 2014
    Posts:
    4
    Same bug - when you throw files into a project, changes the first letter to "_"
    Unity 2020.1.11f1
    Mac OS Catalina and Big Sur
     
  35. Ng0ns

    Ng0ns

    Joined:
    Jun 21, 2016
    Posts:
    170
    Getting this as well. Noticed it after updating to 2020.1.14f1, but it might have been earlier.

    Windows 10 pro.
     
  36. Dreamer

    Dreamer

    Joined:
    Mar 8, 2011
    Posts:
    67
    Unity 2020.1.15 still have this bug. Great job
     
    sama-van likes this.
  37. unity-werkstatt

    unity-werkstatt

    Joined:
    Oct 7, 2015
    Posts:
    10
    _ust _nstalled _020.1.15 _ut _f _ou _dd _iles _irectly _n _older _nity _ill _mport _ith _o _ssue
     
    Jubessin, KB_sky, Raptosauru5 and 6 others like this.
  38. shusei918

    shusei918

    Joined:
    Dec 30, 2017
    Posts:
    1
    Same on macOS Catalina 10.15.7, Unity 2020.1.14
     
  39. uniGama

    uniGama

    Joined:
    Sep 16, 2014
    Posts:
    1
    Bug is still there on Unity 2020.1.16f1, New Project, Windows 10 Home
     
  40. viccallan

    viccallan

    Joined:
    Aug 23, 2020
    Posts:
    1
    Same here PC, Mac & linux Standalone - Unity 202.1.15f1 Personal <dx11> Windows 10 Home 1909 1836.1082 64-bit os my characters are now _alk, _dle, _ead, _un and _ump. Started taking a unity course I'm glad it's not because I'm doing something wrong.
     
  41. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,692
    Same issue Unity 2020.1.14f1.
     
  42. Matugas

    Matugas

    Joined:
    Feb 15, 2017
    Posts:
    2
    Same issue here
    Unity 2020.1.16f1
    Windows 10
     
  43. Solid68

    Solid68

    Joined:
    Oct 13, 2020
    Posts:
    4
    Seems to be fixed in version 2020.1.17f1
    Funny is the fact that all the names in my project are correct now without renaming them.
    You need only to upgrade to 2020.1.17f1 and all material names are correct
     
  44. Matugas

    Matugas

    Joined:
    Feb 15, 2017
    Posts:
    2
    Yeah, in version 2020.1.17f1 the issue is gone.
    Thanks
     
    thorikawa likes this.
  45. pavelmo4alov

    pavelmo4alov

    Joined:
    Mar 13, 2013
    Posts:
    14
    Also have this issue
    Unity 2020.1.15f1
    macOS 10.15.7

    2020.1.17 version is have fixes :)
     
    Last edited: Dec 18, 2020
  46. DryreL

    DryreL

    Joined:
    Feb 23, 2020
    Posts:
    37
    Same problem here.

    2020.1.16f1
     
  47. DisCc

    DisCc

    Joined:
    Feb 11, 2019
    Posts:
    1
    I had the same problem, tried with 2020.2.0f1 but it have the same problem for me.
    Tried with 2020.1.17f1 and can confirm it works fine.
     
  48. pverflow

    pverflow

    Joined:
    Jun 4, 2019
    Posts:
    6
    2020.1.14f1 same happens to me too (win 10 / 64) developing for Android/IOS
     
  49. cryogee

    cryogee

    Joined:
    Aug 6, 2009
    Posts:
    132
    Tested with 2020.2.1f1. No issue in this version so far.
     
  50. VinyxAi

    VinyxAi

    Joined:
    Jul 15, 2018
    Posts:
    6