Skip to content

Commit

Permalink
updated pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
bozmir committed Oct 17, 2024
1 parent 0c51c97 commit eb6cfcc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ private void CreateGeoJSONLayer(LocalFile localFile, UnityEvent<string> onErrorC
if (onErrorCallback != null)
newLayer.OnParseError.AddListener(onErrorCallback.Invoke);

var fullPath = localFile.LocalFilePath;
var fileName = Path.GetFileName(fullPath);
var localPath = localFile.LocalFilePath;
var fileName = Path.GetFileName(localPath);
var propertyData = newLayer.PropertyData as LayerURLPropertyData;

if (localFile.SourceUrl.StartsWith("http") || localFile.SourceUrl.StartsWith("https"))
if (localFile.SourceUrl.StartsWith("http"))
propertyData.Data = AssetUriFactory.CreateRemoteAssetUri(localFile.SourceUrl);
else
propertyData.Data = AssetUriFactory.CreateProjectAssetUri(fullPath);
propertyData.Data = AssetUriFactory.CreateProjectAssetUri(localPath);
}
}
}

0 comments on commit eb6cfcc

Please sign in to comment.