Shown below is a bug I’m getting when trying to make a new file in the content browser that’s over 28 characters. I’m running the UE4 engine from the official binaries. The source was not compiled or modified by me.
I’m following the official UE4 tutorial series about animating and setting up a character in UE4 - - YouTube
Upon trying to make the blend space file name at 5 minutes and 51s named idle_walk_run my UE4 version says it’s too long. I’m assuming this is some type of bug.
Hmm, well my project is using the default My Documents location of - C:\Users\Administrator\Documents\Unreal Projects
So the location of that new file I’m making is this -
C:\Users\Administrator\Documents\Unreal Projects\ThirdPerson_Scratch\Content\Characters\animations
It does use a particularly pathological case when working out what it determines to be too long.
Are you building from source? If so, could you put a breakpoint in SAssetView::AssetVerifyRenameCommit (SAssetView.cpp) and see what it’s calculating for SubPath and PathCalcLen? (as compared against MAX_PROJECTED_COOKING_PATH).
Don’t worry about it if you’ve not got yourself set-up to build from source - if you had it would have saved some time, but I can try and repro it myself tomorrow.
I suspect that we can relax the limit on that slightly now, since we’ve made the cook path shorter recently (although only a handful of characters shorter).
What version of the editor are you on currently? I have been unable to reproduce the effect you describe thus far. What are the steps you are taking that cause this specific problem. Have you been able to reproduce this in a clean project with no additional content? For instance, open a blank project and simply create a blend space named idle_walk_run, see if that gives you the same error. Thank you!
I’m currently on Version 4.2.1-2101290+++depot+UE4-Releases+4.2.
I’m easily able to reproduce this in a clean project with and without the starting content provided in a blank work space… So check this out -
I have UE4 installed with all default settings on my C drive. I launch the UE4 launcher, create a new project with the blank workspace template. I create a few folders, import some assets, they come in fine. I try to make a BlendSpace, it creates it fine with the default name, if I go to try and rename it, even down to 1 character, I get an error.
Say I create another folder and go deeper, I create a default material using the default name, it works fine. If I try to create any other object there with a custom name, boom cannot do it.
The fact that I can go even deeper with folders, and that I’m able to create default objects with default names, but then not be able to rename a new object doesn’t make sense.
Just as a confirmation, using UE4 here from binaries too and got the same problem. You can import assets with quite long names that cannot be renamed because of path length so this is a general issue. Why is there such a limit to path length overall, and if there has to be one, just give us the option to set the max length via Editor or console variable or something, if there isn’t already?
The Windows explorer API has a namespace limit of 260 characters. Unless UE4 some how switches over to a unicode system which supports a character length of 32,000, they are kinda stuck :/.
But something is definitely wrong when I can import assets with longer names than ones I make!
It is working as intended. If you have too long of a filepath it will throw the warning that the file cannot be named in a certain way. Take the file to a more shallow file path to be able to name it as needed.
Thanks, this is a decent work around but it doesn’t answer the underlying issue with why files with long names can be imported but files created cannot be renamed to the same length.
Also there is no such thing as UDK4, it’s the Unreal Engine 4.
It maybe down to overlapping business logic in the code (e.g. The routine that executes the loading of the project might not check the file path length, but when the user attempts to rename or add a new asset, then the file paths are checked). This would be by design, and hence why it might not have been picked up by the testers.
Whenever you decide to create a project, change the Project folder from the default to a ‘shallow path’ on the hard drive, you generally wont encounter this problem. See Image below:
, I truly don’t believe it is working as intended. Users and myself are able to import files with longer names in directories just fine. However if we create a file in the editor and try and rename it, we cannot. An example of this is in the first image I’ve posted.
If you look at the file names right next to the file I’m creating, they are much longer.