How Do You Set ASSET_DIR_INDICATOR for Android? [Solved]

Hello, I would like to enable ASSET_DIR_INDICATOR to be able to use ScanDir() on android. How can I do that, thanks for any help. History of commits that I couldn’t make sense of, relating to the subject: … System.cpp

If I recall correctly then you just need to define it as an environment variable. The value of the variable is the character indicator itself. If it works for you, you can help to send a PR to update the doc. I believe it is an undocumented feature at the moment.

I added the line “export ASSET_DIR_INDICATOR=_” to .bashrc but the results of ScanDir() are not the same as in native. The results are so odd that I need some time to look through things to try and figure out what’s happening.

It relies on an ant custom rule (custom_rules.xml), so make sure you don’t miss out that file. Last time I use the feature, it worked as expected for me. Good luck.

I copy/pasted the custom_rules.xml from urho android build directory to my projects android build directory. I’m not getting the right results. Am I missing anything else?

Obviously you also need to reference the file somewhere in your default Ant build script (build.xml).

Edit: Found I luajit was set for native but not for android. After setting for android I got an error. I’m opening a new thread for that error.

I think I got it working somewhat. DirExists() isn’t working though. Not sure if the following is related because of paths but I’m getting “Could not find resource bit.lua” (I’m using luajit).