2019-09-27 12:08:18 -04:00
using System ;
namespace UnityAtoms
{
/// <summary>
/// Internal constant and static readonly members for runtime usage.
/// </summary>
2019-10-01 11:27:22 -04:00
public static class Runtime
2019-09-27 12:08:18 -04:00
{
2019-10-14 20:08:41 -04:00
/// <summary>
/// Runtime constants
/// </summary>
2019-10-01 11:27:22 -04:00
public static class Constants
2019-09-27 12:08:18 -04:00
{
/// <summary>
2019-10-15 16:02:44 -04:00
/// 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.
2019-09-27 12:08:18 -04:00
/// </summary>
public const string LOG_PREFIX = "UnityAtoms :: " ;
}
2019-10-15 16:02:44 -04:00
2019-11-14 06:59:11 -05:00
#if UNITY_EDITOR
private static bool? _isUnityAtomsRepo = false ;
#endif
2019-10-15 16:02:44 -04:00
/// <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>
2019-11-14 06:59:11 -05:00
public static bool IsUnityAtomsRepo
{
#if ! UNITY_EDITOR
get = > System . Environment . CurrentDirectory . Contains ( "unity-atoms/Examples" ) ;
#else
get = > ( _isUnityAtomsRepo = ( _isUnityAtomsRepo ? ? System . Environment . CurrentDirectory . Contains ( "unity-atoms/Examples" ) ) ) . Value ;
set = > _isUnityAtomsRepo = value ;
#endif
}
2019-09-27 12:08:18 -04:00
}
}