Unity 平台路径获取

private string GetPlatfromPath()
{

if UNITY_EDITOR

    string _filepath = Application.dataPath + "/StreamingAssets/";

elif UNITY_IPHONE

 string filepath = Application.dataPath +"/Raw/";

elif UNITY_ANDROID

 string filepath = "jar:file://" + Application.dataPath + "!/assets/";

endif

    return _filepath;
}

你可能感兴趣的:(Unity 平台路径获取)