示例#1
0
        /// <summary>
        /// Saves the replay from the provided file name.
        /// </summary>
        public void Save()
        {
            if (string.IsNullOrEmpty(replayNameText.text) || replayNameText.text.IndexOfAny(Path.GetInvalidFileNameChars()) >= 0)
            {
                UserMessageManager.Dispatch("Please enter a valid replay name!", 5f);
                return;
            }

            ReplayExporter.Write(replayNameText.text, fieldPath, robotPath, trackers, contacts);
            StateMachine.Instance.PopState();
        }
示例#2
0
        /// <summary>
        /// Saves the replay from the provided file name.
        /// </summary>
        public void Save()
        {
            if (string.IsNullOrEmpty(replayNameText.text) || replayNameText.text.IndexOfAny(Path.GetInvalidFileNameChars()) >= 0)
            {
                UserMessageManager.Dispatch("Please enter a valid replay name!", 5f);
                return;
            }

            ReplayExporter.Write(replayNameText.text, fieldPath, trackers, contacts);
            StateMachine.Instance.PopState();

            if (SimUI.changeAnalytics)
            {
                Analytics.CustomEvent("Saved Replay", new Dictionary <string, object> //for analytics tracking
                {
                });
            }
        }