Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

856 B
Raw Blame
using System.IO;
using UnityEngine;

namespace Statecraft.Game
{
    public static class Paths
    {
        // In the editor, content is read from the repo. Copying content into player builds comes in M3 (first player build).
        public static string RepoRoot => Path.GetFullPath(Path.Combine(Application.dataPath, "..", ".."));
        public static string Content => Application.isEditor ? Path.Combine(RepoRoot, "content") : Path.Combine(Application.streamingAssetsPath, "content");
        /// <summary>translations/ beside <see cref="Content"/> (#1618): the repository's in the editor, StreamingAssets' copy in a player.</summary>
        public static string Translations => Path.Combine(Path.GetDirectoryName(Content)!, "translations");
        public static string StreamingMap => Path.Combine(Application.streamingAssetsPath, "map");
    }
}