Replicated scene wrong path

Hi, I’m having problem connecting the client of my game (running on linux) to the server (running windows).


INFO: Connecting to server
ERROR: Could not find resource C:/Users/username/lgk/build/bin/Data/Scenes/scene1.xml
ERROR: Null file for async loading

If the client and the server are both in Linux everything works correctly.

It seems that the server is sending the wrong scene path, it should be Data/Scenes/scene1.xml instead of C:/Users/username/lgk/build/bin/Data/Scenes/scene1.xml.

Can somebody help me? Thanks! :slight_smile:

(Im using version 1.7)

I’m not certain this is your solution (I’m still less than a week in Urho) but take a look at ResourceCache::SanitateResourceName - looks like it strips unnecessary path information.

Hi, thanks for helping. Maybe that method should be used in this line:

1 Like

I tend to agree - at least for the case of networking, it makes sense (to me) to always sanitize resource filepaths, though I am presuming that the ResourceCache is capable of ‘re-decorating’ them internally for platforms that require absolute paths. I think that is what the resourcepath prefix stuff is about?