using System; using System.Reflection; using UnityEditor; namespace TapjoyEditor { internal static class PlayerSettingsCompat { #region applicationIdentifier static PropertyInfo applicationIdentifierPropertyInfo; /// /// Provides access to /// available since Unity 5.6.0 /// or . /// internal static string applicationIdentifier { get { if (applicationIdentifierPropertyInfo == null) { applicationIdentifierPropertyInfo = typeof(PlayerSettings).GetProperty("applicationIdentifier"); if (applicationIdentifierPropertyInfo == null) { applicationIdentifierPropertyInfo = typeof(PlayerSettings).GetProperty("bundleIdentifier"); } } return (string) applicationIdentifierPropertyInfo.GetValue(null, null); } } #endregion } }