/// <summary>
    /// Used when an event is raised and the event needs to be published to the analytics server instantly
    /// </summary>
    /// <param name="package">Event package we are sending</param>
    public static void PublishEvent(EventPackage package)
    {
        var result = UnityEngine.Analytics.AnalyticsEvent.Custom(ApplicationVersion + ":" + package.EventName, package.Data);

        if (result != UnityEngine.Analytics.AnalyticsResult.Ok)
        {
            UnityEngine.Debug.LogError(package.EventName + " Failed: " + result.ToString());
            Log.Write(package.EventName + " Failed: " + result.ToString());
        }
#if (UNITY_EDITOR || UNITY_EDITOR_OSX)
        if (Application.isEditor)
        {
            //var sendName = ApplicationVersion + ":" + package.EventName + "(" + result.ToString() + ")";
            //package.EventName = sendName;
            EventValidator.RecieveEvent(package, result);
            //ConvertToJSON(package);
        }
#endif
    }