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

This commit is contained in:
bd_ 2022-09-17 09:58:47 -07:00
parent 79be8774a9
commit ba33ea81b1

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));
}
}