Ryan DowlingSoka Profile picture
Nov 8, 2022 5 tweets 2 min read Read on X
#UE5 #UnrealEngine

When working with editor utilities sometimes you need an object type that isn't a "BlueprintType". This makes your life hard, because you can't cast to it.

Don't fear: Create an ExecutePythonScript node with an input and an output and link em. Image
In the above example, UFactory is not a blueprint type, so we can only construct it as a UObject. Then we can't cast it regularly, so we use the ExecutePythonScript to skip past that issue and plug it into CreateAsset which wants a factory directly.
Just to make sure it's clear. You only have access to the ExecutePythonScript in EditorUtilityWidgets and EditorUtilityObjects, it won't work at runtime, and you shouldn't want it to.
If you want this to work like an actual cast, and not just crash when the cast fails: Image
Addendum in the CreateAsset case, there are other ways around this that don't feel like you are committing crimes:



The need for such a cast still likely exists in other places, but maybe not this one.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Ryan DowlingSoka

Ryan DowlingSoka Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @RyanDowlingSoka

Nov 10, 2022
I've written a post on Triplanar Mapping, and a few alternative ways to set it up in #UnrealEngine to make it more efficient.

It is great for blending different objects together, learn how to use TAA or biplanar mapping to make it cheaper!

ryandowlingsoka.com/Triplanar-Dith…

1/7
I break down the material functions and more in the post, but I am also sharing the project files outright, so you can get a head start implementing these different techniques in your projects.

ryandowlingsoka.com/Triplanar-Dith…

2/7
I'm not the first to setup triplanar mapping there is a lot on the subject, I'm shouting out my references here:

@TheRealMPalko : martinpalko.com/triplanar-mapp…

@bgolus : bgolus.medium.com/normal-mapping…

@iquilezles : iquilezles.org/articles/bipla…

@Atrix256 : blog.demofox.org/2022/01/01/int…

3/7
Read 8 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(