-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPaths.cs
More file actions
26 lines (20 loc) · 1.03 KB
/
Paths.cs
File metadata and controls
26 lines (20 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System.IO;
using System.Linq;
using UnityEngine;
namespace NeoModLoader.AutoUpdate;
internal class Paths
{
public static readonly string StreamingAssetsPath = Combine(Application.streamingAssetsPath);
public static readonly string NMLWorkshopPath =
Combine(GamePath, "..", "..", "workshop", "content", "1206560", "3080294469");
public static string GamePath => Application.platform switch
{
RuntimePlatform.WindowsPlayer => Combine(StreamingAssetsPath, "..", ".."),
RuntimePlatform.LinuxPlayer => Combine(StreamingAssetsPath, "..", ".."),
RuntimePlatform.OSXPlayer => Combine(StreamingAssetsPath, "..", "..", "..", "..", ".."),
_ => Combine(StreamingAssetsPath, "..", "..")
};
public static string NMLPath { get; internal set; }
public static string NMLPdbPath => Combine(StreamingAssetsPath, "Mods", "NeoModLoader.pdb");
private static string Combine(params string[] paths) => new FileInfo(paths.Aggregate("", Path.Combine)).FullName;
}