vrchat-community / UdonSharp

A compiler for compiling C# to Udon assembly
https://udonsharp.docs.vrchat.com
MIT License
470 stars 50 forks source link

MissingReferenceException: The variable sourceCsScript of UdonSharpProgramAsset doesn't exist anymore. #92

Open SchismGit opened 1 year ago

SchismGit commented 1 year ago

I'm getting this error spammed in my console 2 times a second and I can't find any "sourceCsScript" to reassign into that specific location.

Probably being stupid or blind, but any help would be greatly appreciated

MissingReferenceException: The variable sourceCsScript of UdonSharpProgramAsset doesn't exist anymore.
You probably need to reassign the sourceCsScript variable of the 'UdonSharpProgramAsset' script in the inspector.
UdonSharp.UdonSharpProgramAsset.GetClass () (at Packages/com.vrchat.udonsharp/Editor/UdonSharpProgramAsset.cs:482)
UdonSharp.Compiler.UdonSharpCompilerV1.Compile (UdonSharp.Compiler.UdonSharpCompileOptions options) (at Packages/com.vrchat.udonsharp/Editor/Compiler/UdonSharpCompilerV1.cs:302)
UdonSharp.UdonSharpProgramAsset.CompileAllCsPrograms (System.Boolean forceCompile, System.Boolean editorBuild) (at Packages/com.vrchat.udonsharp/Editor/UdonSharpProgramAsset.cs:295)
UdonSharpEditor.UdonSharpEditorManager.UpgradeAssetsIfNeeded () (at Packages/com.vrchat.udonsharp/Editor/UdonSharpEditorManager.cs:800)
UdonSharpEditor.UdonSharpEditorManager.OnEditorUpdate () (at Packages/com.vrchat.udonsharp/Editor/UdonSharpEditorManager.cs:744)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Delegate.DynamicInvokeImpl (System.Object[] args) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
System.Delegate.DynamicInvoke (System.Object[] args) (at <eae584ce26bc40229c1b1aa476bfa589>:0)
UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at <a259d3c004024353a2c217da97495055>:0)
SchismGit commented 1 year ago

I've tried the following to fix it:

Each resulted in the same error being spammed.

MerlinVR commented 1 year ago

It looks like Unity broke on you at some point, You'll probably need to delete program assets until the error goes away to find what asset has the issue.