unity-atoms/Packages/Core/Runtime/Utils/Runtime.cs
jmacgill 3bdd7bbef2
Make IsUnityAtomsRepo OS agnostic (#168)
* Make Examples path check OS agnostic.

Co-authored-by: jrmacgill <jmacgill@gmail.com>
2020-06-24 18:15:28 +02:00

40 lines
1.3 KiB
C#

using System.IO;
namespace UnityAtoms
{
/// <summary>
/// Internal constant and static readonly members for runtime usage.
/// </summary>
public static class Runtime
{
/// <summary>
/// Runtime constants
/// </summary>
public static class Constants
{
/// <summary>
/// Prefix that should be pre-pended to all Debug.Logs made from UnityAtoms to help immediately inform a user that those logs are made from this library.
/// </summary>
public const string LOG_PREFIX = "UnityAtoms :: ";
}
/// <summary>
/// Constants for defining DefaultExecutionOrder.
/// </summary>
public static class ExecutionOrder
{
public const int VARIABLE_RESETTER = -200;
public const int VARIABLE_INSTANCER = -100;
}
/// <summary>
/// Determine if we are working the Unity Atoms source library / repo or not.
/// </summary>
/// <returns>`true` if we are working in the Unity Atoms source library / repo, otherwise `false`.</returns>
public static bool IsUnityAtomsRepo
{
get => System.Environment.CurrentDirectory.Contains(Path.Combine("unity-atoms","Examples"));
}
}
}