unityscript - accessing user documents folder on unity3d -


is possible path current user documents folder on unity3d using unityscript? trying access on desktop systems (windows, linux or osx). on mobile systems, application.persistentdatapath trick me, desktop use documents folder users can see , change files easily.

i don't know if javascript has way windows special folders, c# has environment.getfolderpath.

so 1 way of doing create c# script give documents path , put in standard assets folder. way, javascript can call script.

c# file

using system; public class getuserpathcsharp {     public static string getuserpath()     {         return environment.getfolderpath(environment.specialfolder.mydocuments);     } } 

javascript file

#pragma strict function start () {     var test = getuserpathcsharp.getuserpath();     print("path " + test); } 

note: make sure c# script inside folder called standard assets. it's important.


Comments

Popular posts from this blog

php - Magento - Deleted Base url key -

javascript - Tooltipster plugin not firing jquery function when button or any click even occur -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -