Skip to main content

Editor Utilities Project - Week #3 - Making Right Click Functions, Create Folders & Set LOD's

 

Not always a widget

While adding a widget utility that has an interface is really good for new users or tools that need repeatable functions with differing values on each run, it is a huge development time consumption to create and manage the widgets interface and appearance. To skip all that you can make an "Action Utility" which on the backend works exactly like a widget based utility however the user can run it simply by right clicking with the mouse and selecting the the action they want to run out of the ones that appear on screen. The downside of this is while you can enable user input it is much more limiting then how widgets work and not as friendly to use.


Asset or Actor action utility?

This is a very important distinction to make as the action option will only show up in the relevant context menu and choosing the wrong kind of  utility base class will determine when your function option is shown. 

An Asset action utility will appear in the context menu after a user has right clicked an asset file within the content browser. These kinds of tools can see what is inside the current projects content folders and can change data, parameters, file paths & file names all with a right click. An instance where you want to use this functionality is re-naming all your static mesh class assets to have a pre-determined naming convention helping your project stay organised.

On the other hand an Actor action utility won't show up when an asset in the content browser is selected but instead will show up when you right click on an actor within the level viewport (or outliner panel). The Asset action utility will change asset parameters throughout the whole project and across every single instance that asset is used but this is not always the best practice and can easily break/corrupt the project or level if misused (also dependant on the level of changes made), to stop an unaware user from making project wide changes a tool programmer would want to choose an Actor class based utility as this will only change the parameters of the instance that is currently selected by the user. Since it is only the instance of the asset that is edited by tools function code level designers can have the freedom to use advanced tools really quickly and easily without having the programmers worrying about assets getting edited incorrectly and seriously damaging the project. 


For the next few tools I will be choosing to use Asset based action utilities as I'm going to continue forward by learning how to manage the entire project and all it's content.


Making Folders

I had an idea for an easy to implement task where you can right click in a new empty unreal engine project and instantly create a series of both folders and sub-folders for assets to be imported into later, making the project organised from the start. 

To my surprise there are few tutorials for making Editor Utilities and Unreal Engine Tools unless you are creating C++ scripts (which can do the same as Editor Utilities) that can setup an entire custom version of Unreal Engine for you. The information on the C++ front isn't always for Unreal or game development and is more from Learning C++ resources and C++ for program development, which while really good learning resources are not what I'm looking for with this project and learning how to script Editor Utilities.

Below is an example of how I used trial and error to figure out which node I was looking for to create a folder within the content browser. At first I began by searching for a "Folder" node but the node which I needed is the "Make Directory" and this process (like all trial & error) can take far too long if the programmer is unsure of what it is EXACTLY that they are looking for, which as I  am just learning how to call editor functions is a big roadblock for me. I did manage to find the nodes "Get Asset Registry", "Get Current Browser Path" and found out about the "Virtual" vs "Internal Path" nodes, all of which would prove very useful in future.


To overcome this roadblock I began reading the Epic Games Unreal Engine Documentation as a means of both checking that the task I was looking to accomplish was actually a function I could call from Unreal Engine and checking the terminology.

Once I had the "Make Directory" node the only thing I needed was to know how Unreal would handle the entire project changing its top level directory (which is on my USB so the drive letter changes all the time as it swaps PC). Rather then entering the projects top level directory path of "E:\Uni Files\Unreal Engine\UE5.3\EditTools\Content" (Which btw the "\content" folder is where unreal engine saves any imported or created assets), I found that "/Game" works similarly to the "\content" folder as in Unreal Engine will always remember its location within the  project as long as you do not restructure your entire project outside of unreal using a file browser. This meant that if I entered "/Game/Blueprints" my tool would create a folder named "Blueprints" inside the "\EditTools\content" resulting in the end path being "\EditTools\content\Blueprints" no matter where the main project directory was stored or which computer the tool was used on. 

The rest of the code in this tool is some QOL additions as I do not want the tool to create a 2nd folder named "Blueprints1" or erase all the contents of the 1st "Blueprints" folder and replacing it with an empty one of the exact same name.

You can see the final blueprint below or by following this url "blueprintUE.com/EditTools_CreateFolders".












Continuing Forward

Now that the folders will be made I decided to add a tool that prints a readout of all the assets contained within the currently open directory of the content browser. The idea behind this tool is that a programmer can open the project then navigate to a folder containing another staff members work and immediately get a report as to how many individual asset have been dumped in this directory. now with that information the programmer can begin organising the projects file structure with an idea of what sections need prioritising. This is only relevant if none of the other staff members obey the naming conventions and folder structure when importing their work or editing their respective areas of work.


 





This is the first instance where I have seen the "Show Message Dialogue" node which is really helpful as a way of giving feedback to the user for a non-widget based tool.


Actually adding and changing assets on mass

With a start in managing the content browser it's time to finally add some assets to test out my tools code works, so I imported some static mesh assets I had made for a previous project then ran my Asset Actions and added another tool which creates new LOD stages for any static mesh asset it finds that doesn't already have any LOD's. 

URL to BlueprintUE.com/EditTools_SetNewLOD's



Comments

Popular posts from this blog

Guest Lecture #1 - 21/09/2022 - Secret Mode

Guest - Joshua Garrity, Head Game Scout at Secret Mode Guest Bio Joshua started as a product Manager in the marketing department. Joshua was in charge of digital publishing for Fireshine. Attending public events like Gamescom not only allowed him to network his way into the position as Head Scout at Secret Mode but is also a method he uses to accomplish his job by seeing new indie projects in beta stages at these events. Takeaway #1 – How to Pitch my projects Scouts and Studio CEOs will be travelling often and walking around both Hotels and event centers, so  you  need to be able to pitch your project anywhere at any time. This means your presentation needs to be smooth, quick, and confident, when talking with scouts, CEO, or other representatives you need to answer their questions (without checking notes) and speak honestly about what your team has done and what it will cost for your studio team to do more. Takeaway #2 – What Do Game Scouts Get Up to Game Scouts in their day-...

Guest Lecture #4 - 19/10/2022 - 10:10 Games

  1st Guest Bio - Bart Kosciolek, Junior Animator @ 10:10 Games Jfjdiejdjd 2nd Guest Bio - Reece Hewitson, Junior Games Developer @ 10:10 Games skdjalskjdlkasjd Takeaway #1 - Determination As an applicant trying to get into the industry I will be rejected many times due not being the correct fit for studios I am applying for, be it not enough experience or not the correct style of work for how the studio does things. I need to not let this deter me.  Takeaway #2 - Networking The video games industry is still very young (in business terms/years) and still very small (in one sense), while a single title is a product of many peoples work all put together those people often split after projects have been finished and they will end up working on other projects at other studios and this results in "everyone knows everybody" where you can say a name in conversation with a new co-worker and they'll reply with "oh yeah I know (name) I've worked with them on this project. ...

Guest Lecture #2 - 05/10/2022 - Rebellion Games

  Guest - Peter Dimitrov, Environment Artist @ Rebellion Games Guest Bio Peter enlightened us and told us his day-to-day while he worked on the 1st DLC project for Sniper Elite 5, as a environment artist Peter worked with another level designer to develop and refine the flooded map level that the 2 of them had been assigned to.  Takeaway #1 - Working with limitations      Both Peter and his co-worker had to stick to a schedule where sections of the map needed to be                   done to a specific deadline, the white box version needed to be done within a certain time limit,                   changes could not be made once the art pass had started, the map needed to include certain features like      ditches and a spot for a supply train to run through. The map itself went under many changes before         ...