[PLUGIN] RadiantUI SDK - UIs, HUDs, Interactive WebViews - HTML5/Javascript/CSS

I can successfully call a function in my Hud class from my Character class (tested it with Print String), however how do I get the actual instance of the health HUD element after I get a list of the hud element classes in order to call the function I’ve created on it? Apologies if I’m missing something obvious or rudimentary!

You already solved this :slight_smile: You got element 0 of your HUDElements, that is your WebHud element, you can call your javascript methods from that class as the context.

From the Character I’m calling MyWebHud’s UpdateHealthHUD function, but I can’t seem to call MyHudHealth’s UpdateHealth function because it doesn’t show up?

Is this because it’s a class and not the actual instance of the HudElement? In the Defaults of the Hud you only specify which classes are used for the elements.

I’m wanting to call a function on the actual instance aren’t I? Please see these screenshots (I renamed UpdateHealthHUDElement to just UpdateHealthHUD since previous screenshot):



So yeah it doesn’t look like I can choose UpdateHealth which belongs to the HudElement… is there some intermediary step required?

Apologies if I’m doing something blatantly silly :slight_smile:

No this is my mistake, you are right. I am not exposing the instances of the HUD elements, I spoke too soon. I’ll fix this and upload a new beta build as soon as possible.

No worries. Seeing as there’s not Like or Favourite button for your reply I just thought I’d say thanks and leave a smiley :smiley:

Ok there is a new build up that fixes this issue. Login back into your account on the radiant store page and go to your downloads again. The download name on the page won’t change but download again anyway and you should get Beta 3. You can now get HUDElementInstances from the HUD. I hope that helps!

Thanks , that did the trick!

My next question was going to be how to pass multiple params to the function, but I played around and the following seems to work:

From my experiments I’m guessing the order of params is determined by their order in the Defaults panel for the JS Function blueprint correct?

Does this use webkit? We have a HTML5 webapp and I would like to test it (in a demo) before purchasing a license.

Yes that’s right. The order of the variables in the blueprint is the order they are passed to Javascript.

I’ll probably get a demo version built but there isn’t one available yet.

Hey , I assume this is the best place to post?

Just a quick question, do the regular blueprint draw functions work from a RadiantWebviewHUD? I’m trying to draw a dynamic minimap, but when I moved my blueprint over to a radiant hud it doesn’t seem to draw.

It definitely should draw. I just tested it in the sample project, adding a draw line to the Event Received Draw HUD I can render lines without a problem…

One day I’ll find an actual bug that isn’t my fault, I was drawing the texture 0 pixels wide :stuck_out_tongue: Thanks for the response.

Is there something glaringly obvious I’m missing?
Yep, turns out I’m an idiot. Disregard, problem solved!

Oh lord I’ve forgotten to add an Interaction component to my character before and it does drive you nuts :slight_smile:

… wait a sec… how did you know that was the problem? :eek:

I can’t seem to find any reliable way to replicate it, but occasionally when I press play with Radiant, UE4 will simply lock up and I have to force quit it. I’m running from Visual Studio and nothing suspect shows up in the log, the main way I’ve made it happen is just by spamming play/stop, but it seems to happen at random (Generally inconvenient) times. Sorry that I can’t give any useful information, but any idea what might be happening?

I have seen this before too, and I have someone else who is asking about this. I’m trying to figure out what’s going on. You can expect another beta release when I get it fixed.

Cool, glad you’re working on it, it’s pretty annoying, though it seems to happen a lot less in packaged builds.

Also, is there a way to modify the HUDElements in a hud from blueprint? I’d like to load in a new Hud over the top of my current one and remove it at runtime, but it seems like I can’t add or remove HUDElement Instances, and changing the HUDElement class does nothing, though that makes sense. Is this functionality available or should I just be showing and hiding elements instead of trying to add and remove them?

Regarding packaging up for standalone:

I’m following your video tutorial on how to get this working, but have hit a snag. The tutorial is asking me to ‘Add code to project’, however that menu item is grayed out for me. Any ideas?