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

c# - Sort XmlNodeList with a specific Node value -

Android Java.Lang.RuntimeException : Unable to start activity Component Info -

actionscript 3 - Equivalent to moveReceived in ElectroServer 5 -