How to set the widget class to none in c++

  • SetWidet sets the the already spawned widget class instanced object for the WidgetComponent
  • SetWidetClass calls a spawn function on the passed uclass and then calls SetWidet on the WidgetComponent.

SetWidetClass fails if you pass in a nullptr, because you cannot spawn a widget from nullptr, causing a crash.