コード例 #1
0
        public void ReloadScript()
        {
            var initialTargetVersion = targetVersion;

            int localCurrentVersion;

            do
            {
                localCurrentVersion = currentVersion;
                if (targetVersion <= localCurrentVersion)
                {
                    targetVersion = localCurrentVersion + 1;
                }
            }while (currentVersion != localCurrentVersion);

            if (targetVersion > initialTargetVersion)
            {
                OnScriptChanged?.Invoke(this, EventArgs.Empty);
            }
        }