# (39) 's Extra Blueprint Nodes for You as a Plugin, No C++ Required!

**URL:** <https://forums.unrealengine.com/t/39-s-extra-blueprint-nodes-for-you-as-a-plugin-no-c-required/3448>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [April 29, 2014, 1:27am UTC](https://forums.unrealengine.com/t/39-s-extra-blueprint-nodes-for-you-as-a-plugin-no-c-required/3448 "2014-04-29T01:27:59Z")\
**Posts on this page:** 1\
**Showing post:** 433

<div class="post-metadata">

**Author:** ![Rama](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rama/32/882413_2.png) [@Rama](https://forums.unrealengine.com/u/Rama)\
**Post date:** [November 21, 2014, 10:27pm UTC](https://forums.unrealengine.com/t/39-s-extra-blueprint-nodes-for-you-as-a-plugin-no-c-required/3448/433 "2014-11-21T22:27:50Z")

</div>

\*\*Get Widgets of Class

Ideal for UMG Level Transitions\*\*

I needed node for Solus and so I am now sharing it with you!

The was that I could not save a reference to my new widget because it is loaded and then a level change occurs which resets my HUD variables.

So I needed to access the widget after it was created dynamically, not relying on stored references within the HUD class.

I also did not want to have to store a reference to it in my Game Instance class cause then that leads to garbage collection issues.

I had to make the node for my own use and I have tested it as working in Solus!

\*\*Now you can retrieve an array of any type of user-made UMG widget that is currently in your game at any!  
\*\*

```auto

**Download**

https://wiki.unrealengine.com/File:VictoryPlugin.zip

```

**C++ Code**

Here’s what my C++ for node looks like!

```auto

void UVictoryBPFunctionLibrary::GetAllWidgetsOfClass(UObject* WorldContextObject, TSubclassOf<UUserWidget> WidgetClass, TArray<UUserWidget*>& FoundWidgets)
{
	//Prevent possibility of an ever-growing array if user uses in a loop
	FoundWidgets.Empty();
	// ~~~~~~~~~~~~
	 
	if(!WidgetClass) return;
	if(!WorldContextObject) return;
	 
	UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject);
	if(!World) return;
	// ~~~~~~~~~~~
	
	for(TObjectIterator<UUserWidget> Itr; Itr; ++Itr)
	{
		if(Itr->() != World) continue;
		// ~~~~~~~~~~~~~~~~~~~~~
		
		if(Itr->IsA(WidgetClass))
		{
			FoundWidgets.Add(*Itr);
		}
	}
}

```

```auto

**Pic**

(right click -&gt; open in new tab to see it better)
![GetAllWidgetsOfClass.jpg|1280x960](upload://k3rJSJemWVjAQ9p7eXZQVNYeJAl.jpeg)

Enjoy!
```

---

_[View the full topic](https://forums.unrealengine.com/t/39-s-extra-blueprint-nodes-for-you-as-a-plugin-no-c-required/3448)._
