getAssetPath() returns unexpected path?


I’m using Cinder on MacOS and getting unexpected results when using getAssetPath.

According to this page when calling getAssetPath( "shaders/cellular.frag" ) I’m expected to get in return the path .../MyProject/assets/shaders/cellular.frag.

However what I’m getting back is something more complicated from the build package: .../MyProject/xcode/build/Debug/

Any idea why that’s happening? It’s causing me problems because I’m attempting to use this in combination with fs::last_write_time to be able to live edit and auto reload my shaders. However it seems the one I’m editing from my assets folder is not the one that is actually being watched.

Thanks a lot for the help :slight_smile:

Have you perhaps accidentally included your assets folder inside your app bundle? To check, in Xcode go to your project settings, and under the Build Phases tab, there is a Copy Bundle Resources phase. Did assets (probably a reference) end up here?


1 Like

Oh wow that’s exactly what the problem was. Not sure how it ended up over there :stuck_out_tongue: Thanks so much Andrew!