Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Bug We have a ":" in our games title, and now on unity 2022.3.27 it won't build

Discussion in 'Scripting' started by ProfessorDex, May 17, 2024.

  1. ProfessorDex

    ProfessorDex

    Joined:
    Nov 13, 2013
    Posts:
    5
    The colon in the game title seems to be breaking unity's ability to build to android from Windows. It seems to work on Mac however.

    It keeps trying to create a folders with the game title name, which happens to have a colon in it, and since windows folders can't have a colon in the name, it fails.

    It built just fine in 2022.3.19 with this name, but that was because it's building those folders (specifically the burst debug folders) with the .apk name. Did something in the .27 upgrade change the way it creates and names these folders? It seems like it'd be bizarre to not allow a game to have a colon in it's name, so I might just be missing something.

    Has anyone dealt with this before and have a fix?

    The actual error:
    Building Library\Bee\artifacts\Android\AsyncPluginsFromLinker failed with output:
    System.IO.IOException: The directory name is invalid : 'C:\Users\---\Desktop\Stick War: Saga_BurstDebugInformation_DoNotShip'

    Resolved! Needed to upgrade Burst from 1.8.13 to 1.8.15 - Seems like this was a known issue!
     
    Last edited: May 17, 2024
  2. bugfinders

    bugfinders

    Joined:
    Jul 5, 2018
    Posts:
    2,185
    tbh i think you were lucky, certainly it wasnt that long ago you certainly werent allowed to create folders with a : in the name
     
  3. ProfessorDex

    ProfessorDex

    Joined:
    Nov 13, 2013
    Posts:
    5
    It's not so much about the folder name not being allowed a colon in it, it's Unity changing the way it creates folder names. i.e. Taking the folder name from the Product Name instead of the name of the .APK
     
  4. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,565
    You learned the hard way. Keep filenames and folder names super simple. The strings you put onto the screen can be filled with punctuation or Unicode characters, but anything related to filenames should be short and use simple characters only.

    On Windows, a
    :
    identifies a device name, slashes and backslashes are used to separate folders, and even
    %
    can have a special meaning. On Unix/Linux/MacOS, you might be able to name files with these characters, but it's best to avoid it. Avoid all sorts of characters like
     < > : \ / " ' @ # $ % & ( ) { } [ ] ~ ^ | 
    , even if you're allowed to make files with them in the file browser / finder. They have additional meanings when scripted tool chains are running to compile your code or project, and bugs in those scripts may not properly protect themselves from misunderstanding your filenames.

    I agree that Unity should also not just blindly use the PRODUCT NAME as a folder name, but it does.
     
  5. ProfessorDex

    ProfessorDex

    Joined:
    Nov 13, 2013
    Posts:
    5
    Resolved! Needed to upgrade Burst from 1.8.13 to 1.8.15 - Seems like this was a known issue!
     
  6. ProfessorDex

    ProfessorDex

    Joined:
    Nov 13, 2013
    Posts:
    5
    So this has nothing to do at all with how I name folders, or any of my folders. Unity was CREATING folders based on the Product Name, aka the title of the game. A game title should absolutely be able to have any characters in it, including a ":" - which lots of games do.

    I know very well that folders can't have special characters. Which is why this was a problem that unity was trying to create those folders at all.