Beispiel #1
0
 /// <summary>
 ///     checks whether the current value of a variable is null (not nullable types return false)
 /// </summary>
 /// <param name="udonBehaviour"></param>
 /// <param name="symbolName"></param>
 /// <param name="variableType"></param>
 /// <returns></returns>
 /// <exception cref="ArgumentException">if udonBehaviour is invalid</exception>
 public static bool IsInspectorVariableNull(this UdonBehaviour udonBehaviour,
                                            string symbolName,
                                            out Type variableType)
 {
     udonBehaviour.GetInspectorVariable(symbolName, out var variableValue, out variableType);
     return(variableType.IsNullable() && variableValue.IsUnityObjectNull());
 }