Reducing Interact Widgets In Unreal Engine
<p>If you’ll remember, the last article on this project was about reducing the amount of Blueprints needed for a weapons pick up system. Well, one of the glaring issues that we had with that final design is that there was still a needless type floating around.</p>
<p>In the current design, the struct was broken and an interact widget class was selected, so that there was a pop up when the player was close enough to pick up the item.</p>
<p><img alt="" src="https://miro.medium.com/v2/resize:fit:770/1*BbsZ5Qdc37Z8QRCcco_TnQ.png" style="height:314px; width:700px" /></p>
<p>In #2, the struct is broken, and an interact widget (defined by the level designer) is created to display the pick up type</p>
<p>This works fine, but it’s unnecessary and will require the UI Designer (that’s also me, by the way…) to create a widget for every weapon type. This is a waste of precious memory, and we can make this much more efficient using a single User Widget. Remember, we want to adhere to as many DRY principles as possible!</p>
<p>So first, I just created a new user widget which will be used for all of our interact prompts. I called it W_Interact.</p>
<p>This Widget just has two components, a text component (for displaying the weapon type) and an image component which just displays a button prompt.</p>
<p><a href="https://medium.com/@christopherguyton87/reducing-interact-widgets-in-unreal-engine-481e657e4cd3"><strong>Website</strong></a></p>