UdonSharp icon indicating copy to clipboard operation
UdonSharp copied to clipboard

Help users resolve 'Udon C# Program Asset is null' error

Open Faxmashine opened this issue 2 years ago • 3 comments

Feature Description: Users often create empty Udon C# Program Assets. This prevents UdonSharp from compiling. Users often do not understand the error. Possible reasons:

  • They're inexperienced with UdonSharp
  • They received their UdonSharp assets from someone else
  • They created the Asset on accident and forgot about it
  • Double-clicking the error does not highlight the asset (Unconfirmed)

Regardless, we should help users identify the issue, and suggest a solution.

For example:

  • The error should indicate that the file should either be deleted, or a source C# script should be added
  • The error could be downgraded to a warning, as was the case before U# 1.0

Faxmashine avatar Dec 16 '22 02:12 Faxmashine

Is there any update to this? I made the mistake of migrating my Unity project to VCC, and all of the sudden my UdonSharp is broken and so are my worlds which I can no longer fix or update.

I noticed my UdonGraphs were fine, but any instance of an UdonSharp script were screwed. So I deleted them all. I now have zero items with UdonSharp scripts on them, and yet, no matter which Scene I open in the entire project, I'm told there's a "Cube(2)" with a null script. There isn't a single "Cube(2)" in any scene in the entire Project. It makes no sense. Two weeks of failed attempts to fix now.

dpr1990 avatar May 01 '23 22:05 dpr1990

You may have a prefab named that which you need to update. You can try re-migrating the old version of your project that VCC leaves. This issue doesn't seem relevant to your problem though and sounds more like Unity just broke during migration.

MerlinVR avatar May 01 '23 22:05 MerlinVR

Feature Description: Users often create empty Udon C# Program Assets. This prevents UdonSharp from compiling. Users often do not understand the error. Possible reasons:

  • They're inexperienced with UdonSharp
  • They received their UdonSharp assets from someone else
  • They created the Asset on accident and forgot about it
  • Double-clicking the error does not highlight the asset (Unconfirmed)

Regardless, we should help users identify the issue, and suggest a solution.

For example:

  • The error should indicate that the file should either be deleted, or a source C# script should be added
  • The error could be downgraded to a warning, as was the case before U# 1.0

I am actually in this very position, I am completly new to creating a world, and I grabbed a bunch of prefabs to throw into my world and for the most part they work, except for a prefab bowling lane setup that is showing that error, and it's referring to a "joiner" in the prefab, but I cannot for the life of me figure out what is wrong and I attempted to try contact the prefab creator by email as that was the only way to contact them but have yet to get a responce.

InuYasha86000 avatar Dec 07 '23 05:12 InuYasha86000