Announcement

Collapse
No announcement yet.

Blueprint script that runs in the editor?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Blueprint script that runs in the editor?

    A few years ago I was learning Unity, where it was possible to create scripts that you could run inside the editor itself, and not within runtime. Is this also possible in Unreal?

    For example:

    I'm working with lots of video files for this project.
    Currently, when I want to bring in a video file, I have to do these steps each time:

    1. Import the video file – it comes in as a Media Player.
    2. Right click and choose Create Media Texture
    3. Right click the Media Texture and choose Create Material
    4. Double click the Material and move the Texture Sample output from Base Color to Emissive Color

    I then have a certain amount of metadata associated with each video, so I have created a Blueprint called Video_File so that I can assign various variables (Theme_Tags, Favourite, Already_Played etc.)

    Since I am working with hundreds of videos, I'm trying to find out if there is a way to streamline/script this process.

    Ideally, I would like a script that could read a data file (perhaps imported into a Data Table via CSV), which could include file system paths to the video files on drive, which would automate all these steps.

    I'm pretty sure this would be possible in Unity, but I'm having trouble figuring out how to do it in Unreal – all Blueprint scripts seem designed to run once the game has actually started, which is of no use. I'm looking to be able to run scripts that are helpful for creating the content for the game within the editor.

    Anyone know how this can be done?

    Thanks!

    #2
    I'd also like to know this. I had to manually change the collision type on 300 sprites and it was not fun.

    Unpopular Minion on the Play Store (Released: January 31, 2016)

    Comment


      #3
      You should see this https://forums.unrealengine.com/show...-inside-Editor

      Comment


        #4
        I don't think blutility would quite give the functionality that you are wanting since it can't actually import files into the engine through blueprints. You will probably want to look at creating a plugin that will be able to do it for you.
        For the CSV side of things you can definitely do that with all of the metadata.You will need to create a custom struct that holds the fields you have (leave out the first row which will be name, it should be in your csv though), then just import in your csv and it will create a data table and you just tell it what struct to use.

        For speeding up the creation of the materials I would setup a material instance and have your media texture as a parameter so that you can just dynamically assign that video to the material. In your blueprint you can create a dynamic material instance and then tweak the values in there.

        Comment


          #5
          Ah, very interesting to learn about Blutility – thanks rsfx! Unfortunately, as ZoltanJr points out, what I'm asking is a bit beyond the scope of Blutility.

          Would love to code a plugin, but I'm only just starting out in C++ and feel like it would take most of my development time just figuring that out!

          Looks like I'll be putting everything together by hand...

          Comment

          Working...
          X