Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Commit

Permalink
Attempt to fix weird edge case where UI fails to find a class
Browse files Browse the repository at this point in the history
  • Loading branch information
MerlinVR committed Jul 28, 2020
1 parent c12182e commit 6644ce6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/UdonSharp/Editor/UdonSharpProgramAsset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ private object DrawUnityObjectField(GUIContent fieldName, string symbol, (object
{
UdonBehaviour targetBehaviour = objectFieldValue as UdonBehaviour;
UdonSharpProgramAsset targetProgramAsset = targetBehaviour?.programSource as UdonSharpProgramAsset;
if (targetProgramAsset && targetProgramAsset.sourceCsScript)
if (targetProgramAsset?.sourceCsScript?.GetClass() != null)
variableType = targetProgramAsset.sourceCsScript.GetClass();

labelText = $"{objectFieldValue.name} ({variableType.Name})";
Expand Down

0 comments on commit 6644ce6

Please sign in to comment.