Support referencing the basePath object in relative mode (#21)

This commit is contained in:
bd_ 2022-09-17 09:58:47 -07:00 committed by bd_
parent 108df78f06
commit f6a915c2b3

View File

@ -125,7 +125,13 @@ namespace net.fushizen.modular_avatar.core.editor
}
else
{
return PathMappings.MapPath(basePath + binding.path, binding.type == typeof(Transform));
var newPath = binding.path == "" ? basePath : basePath + binding.path;
if (newPath.EndsWith("/"))
{
newPath = newPath.Substring(0, newPath.Length - 1);
}
return PathMappings.MapPath(newPath, binding.type == typeof(Transform));
}
}