Skip to content

Commit 57ed5a2

Browse files
committed
Model path fixed
1 parent 08857da commit 57ed5a2

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

Urho3DExporter/Scripts/Editor/AssetCollection.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ IEnumerator IEnumerable.GetEnumerator()
3838
public void AddMeshPath(Mesh mesh, string fileName)
3939
{
4040
if (fileName.StartsWith(_urhoDataPath, StringComparison.InvariantCultureIgnoreCase))
41-
fileName = fileName.Substring(_urhoDataPath.Length).Replace('\\','/');
41+
fileName = fileName.Substring(_urhoDataPath.Length);
42+
fileName = fileName.Replace('\\', '/');
4243
TryAdd(_meshPaths, mesh, mesh.name, fileName);
4344
}
4445

Urho3DExporter/Scripts/Editor/AssetContext.cs

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,19 @@ namespace Urho3DExporter
88
{
99
public class AssetContext
1010
{
11-
public string UrhoFileName { get; private set; }
11+
public string UrhoFileName
12+
{
13+
get { return _urhoFileName; }
14+
private set { _urhoFileName = value.Replace('/', '\\'); }
15+
}
1216

1317
public string UrhoAssetName { get; private set; }
1418

15-
public string FullPath { get; private set; }
19+
public string FullPath
20+
{
21+
get { return _fullPath; }
22+
private set { _fullPath = value.Replace('/', '\\'); }
23+
}
1624

1725
public string RelPath { get; private set; }
1826

@@ -22,8 +30,12 @@ public class AssetContext
2230

2331
public string Guid { get; private set; }
2432

25-
public string ContentFolder { get; private set; }
26-
33+
public string ContentFolder
34+
{
35+
get { return _contentFolder; }
36+
private set { _contentFolder = value.Replace('/','\\'); }
37+
}
38+
2739
public bool Is3DAsset { get; private set; }
2840

2941
private static readonly HashSet<string> _supported3DFormats = new HashSet<string>()
@@ -39,6 +51,10 @@ public class AssetContext
3951
".blend",
4052
};
4153

54+
private string _contentFolder;
55+
private string _urhoFileName;
56+
private string _fullPath;
57+
4258
public static AssetContext Create(string guid, string urhoDataFolder)
4359
{
4460
var res = new AssetContext

0 commit comments

Comments
 (0)