コード例 #1
0
        private static void VersionUpdateCheck()
        {
            var    seek  = "com.unity.burst@";
            var    first = RuntimePath.LastIndexOf(seek);
            var    last  = RuntimePath.LastIndexOf(".Runtime");
            string version;

            if (first == -1 || last == -1 || last <= first)
            {
                version = "Unknown";
            }
            else
            {
                first  += seek.Length;
                last   -= 1;
                version = RuntimePath.Substring(first, last - first);
            }

            var result = BurstCompiler.VersionNotify(version);

            // result will be empty if we are shutting down, and thus we shouldn't popup a dialog
            if (!String.IsNullOrEmpty(result) && result != version)
            {
                if (IsDebugging)
                {
                    UnityEngine.Debug.LogWarning($"[com.unity.burst] - '{result}' != '{version}'");
                }
                OnVersionChangeDetected();
            }
        }
コード例 #2
0
        private static void VersionUpdateCheck()
        {
            var    seek  = "com.unity.burst@";
            var    first = RuntimePath.LastIndexOf(seek);
            var    last  = RuntimePath.LastIndexOf(".Runtime");
            string version;

            if (first == -1 || last == -1 || last <= first)
            {
                version = "Unknown";
            }
            else
            {
                first  += seek.Length;
                last   -= 1;
                version = RuntimePath.Substring(first, last - first);
            }

            var result = BurstCompiler.VersionNotify(version);

            if (result != version)
            {
                if (IsDebugging)
                {
                    UnityEngine.Debug.LogWarning($"[com.unity.burst] - '{result}' != '{version}'");
                }
                OnVersionChangeDetected();
            }
        }