LDraw_Importer_Unity
LDraw_Importer_Unity copied to clipboard
Missing part or wrong part with sub-file reference
When trying to import a model with a part that has a sub-file reference in the parts/s folder, I receive the error "Missing part or wrong part
It only seems to do it when there are sub-file references even when the file does exist in the /s folder. When getting the filename for the key in the _Parts dictionary, the extra path is not taken into account.
Fixed issue in the LDrawConfig.cs file in the InitParts().
if (!file.Contains(".meta")) { string fileName = file.Replace(_BasePartsPath, "").Split('.')[0];
//Start fix
if (fileName.Contains("\\"))
fileName = fileName.Split('\\')[1];
//End fix
if (!_Parts.ContainsKey(fileName))
_Parts.Add(fileName, file);
}