Exemplo n.º 1
0
 protected override void RefreshProgramImpl()
 {
     if (sourceCsScript != null &&
         !EditorApplication.isCompiling &&
         !EditorApplication.isUpdating &&
         !UdonSharpProgramAsset.AnyUdonSharpScriptHasError())
     {
         CompileAllCsPrograms(true);
     }
 }
Exemplo n.º 2
0
        public bool OnBuildRequested(VRCSDKRequestedBuildType requestedBuildType)
        {
            if (requestedBuildType == VRCSDKRequestedBuildType.Avatar)
            {
                return(true);
            }

            if (UdonSharpSettings.GetSettings()?.disableUploadCompile ?? false)
            {
                return(true);
            }

            UdonSharpProgramAsset.CompileAllCsPrograms(true, false);
            UdonSharpEditorCache.SaveAllCache();

            if (UdonSharpProgramAsset.AnyUdonSharpScriptHasError())
            {
                Debug.LogError("[<color=#FF00FF>UdonSharp</color>] Failed to compile UdonSharp scripts for build, check error log for details.");
                UdonSharpUtils.ShowEditorNotification("Failed to compile UdonSharp scripts for build, check error log for details.");
                return(false);
            }

            return(true);
        }