internal static BuildMetadata SetInstance(string buildName, string fullVersion)
        {
            BuildMetadata instance = new BuildMetadata
            {
                _buildName   = buildName,
                _fullVersion = fullVersion,
            };

            File.WriteAllText(instance.AbsoluteFilePath, JsonUtility.ToJson(instance));

            return(instance);
        }
        public static BuildMetadata GetInstance()
        {
            string filePath = $"{Application.streamingAssetsPath}/{FileName}";

            if (!File.Exists(filePath))
            {
                return(null);
            }

            BuildMetadata instance = new BuildMetadata();

            JsonUtility.FromJsonOverwrite(File.ReadAllText(filePath), instance);

            return(instance);
        }
        private static void InjectMetadata()
        {
#if UNITY_EDITOR
            if (Application.isEditor)
            {
                return;
            }
#endif
            BuildMetadata instance = GetInstance();

            if (instance == null)
            {
                return;
            }

            CrashReportHandler.SetUserMetadata(nameof(BuildName), instance.BuildName);
            CrashReportHandler.SetUserMetadata(nameof(FullVersion), instance.FullVersion);
        }