Skip to content

Instantly share code, notes, and snippets.

View benjaminaaron's full-sized avatar

Benjamin Degenhart benjaminaaron

View GitHub Profile
@benjaminaaron
benjaminaaron / GetStreamingAssetsPath.cs
Created March 11, 2016 18:39 — forked from amowu/GetStreamingAssetsPath.cs
Get Unity StreamingAssets file path with Android and iOS.
// Put your file to "YOUR_UNITY_PROJ/Assets/StreamingAssets"
// example: "YOUR_UNITY_PROJ/Assets/StreamingAssets/db.bytes"
string dbPath = "";
if (Application.platform == RuntimePlatform.Android)
{
// Android
string oriPath = System.IO.Path.Combine(Application.streamingAssetsPath, "db.bytes");