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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Invalid Project Path (Windows 10)

Discussion in 'Editor & General Support' started by PixiePocket, Nov 25, 2021.

  1. PixiePocket

    PixiePocket

    Joined:
    Jul 16, 2020
    Posts:
    5
    Hi all,

    I'm attempting to add a pre-existing project to my Unity Hub(2.4.5) but am coming across issues. The error message that comes up is "Invalid Project Path" with the folder name being "UnityGroupProject-main".

    I have tried three solutions:
    Renaming the file with just the name "UnityG" and making sure it is on the desktop. Did not work

    Removing the "-" and on desktop. Did not work.

    Moving the file to C:\ with a shortened name as "UnityG". Did not work.

    It looks like this is a bug that still hasn't been solved when it comes to Windows-based PC.

    Has anyone come across this before? What is the solution to this issue? I see issues pertaining to opening projects that have already been added but what about those for adding projects to Unity?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,971
    First thing I would try is to make a fresh project somewhere, prove that works.

    Now close Unity and close hub, go into that new empty project, nuke ALL folders

    Copy Assets, ProjectSettings and Packages folder from the actual project you're having issues with over there.

    Open it from Hub. Same story? Or does it work?

    If it doesn't work, copy half of the Assets, if not, half again. Bisect it until it works. It's probably a too-long path or a bad character, like a backslash in a filename or something.

    ALSO: check for super-long path depth, like in third party libraries, like advertising packages. I think Windows is still limited to like 260 characters for a total path length, right here on Thanksgiving Day 2021. Nice.

    Screen Shot 2021-11-25 at 10.29.01 AM.png
     
  3. PixiePocket

    PixiePocket

    Joined:
    Jul 16, 2020
    Posts:
    5
    Thanks, moving the files from the pre-existing project into the new one works. Can anyone say though exactly why this has happened besides a potential character name or too long of a path? I've also increased the MAX PATH LIMIT on Windows with this article here: https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd