Skip to content

Instantly share code, notes, and snippets.

View Solessfir's full-sized avatar

Constantine Romakhov Solessfir

View GitHub Profile
@rtm223
rtm223 / MaterialNodeSnipped.cpp
Last active January 16, 2026 18:28
Creating a standalone Material Function Expression Node Widget
// The MIT License
// Copyright (c) Richard Meredith AB
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WI
@robertfsegal
robertfsegal / gist:6adc43658d7a7ddc3b22a634a98d1372
Created June 23, 2025 23:59
Unreal 5 ResavePackages python script example
import Unreal
args = [
# Run the specific commandlet
"-run=ResavePackages",
"-Replace", # Save the asset once fixed up
# Don't show UI
"-NoPause", # Prevents waiting for key presses
"-NoIntro", # Skip intro movies (just in-case)
@jeremyabel
jeremyabel / MyComponentVisualizer.cpp
Last active July 11, 2025 12:43
Editable Component Vector Property Visualizer
// Copyright Feral Cat Den, LLC. All Rights Reserved.
#include "MyComponentVisualizer.h"
#include "ActorEditorUtils.h"
#include "EditorViewportClient.h"
#include "HitProxies.h"
// Include your component here
struct HMyPropertyHitProxy : HComponentVisProxy
{
@aquanox
aquanox / DefaultEvents.cpp
Last active April 14, 2025 08:34
Smart Default Event Nodes
// Normally it is possible to register each member function to be spawned as default like this
// But it does not work with ForceAsFunction or BlueprintNativeEvents that return value that spawn function graphs
// FKismetEditorUtilities::RegisterAutoGeneratedDefaultEvent(this, UDynamicAssetFilter::StaticClass(), GET_FUNCTION_NAME_CHECKED(UDynamicAssetFilter, K2_FilterAsset));
//
// By utilizig RegisterOnBlueprintCreatedCallback can track new blueprint creation and do any stuff to blueprints
// for example - finding BlueprintDefaultEvent meta and creating default node or graph for Blueprint(Native|Implementable)Event
// With this hook any BNE/BIE with BlueprintDefaultEvent will be generated into default node or overridden by default function
// No more need to manually register each function
void MODULENAME::RegisterBlueprintDefaultEvents()
{
@timoxley
timoxley / MyWorldSubsystemBlueprintBase.h
Last active July 30, 2025 15:17
Subclass this to implement a world subsystem in Blueprint. Supports Timers! #unrealengine #ue5
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Editor.h"
#include "Engine/AssetManager.h"
#include "Engine/BlueprintGeneratedClass.h"
#include "Engine/World.h"
@ThioJoe
ThioJoe / !AddCompressToMenu -- How-To-Use.txt
Last active November 30, 2025 23:36
Add "Compress To" Option to Old Windows 11 Start Menu - Registry Tweak
How To Use:
1. Choose which version you want to use:
- "Full Menu" Version: The same as the original one in the new context menu, and has multiple sub-menu items
- Other Version: Doesn't have a sub-menu, it just directly opens the "Create Archive" menu. (The equivalent of clicking the "Additional Options" sub-item in the original)
2. Double click the "Add_" reg file of whichever version you choose
3. Restart Windows Explorer
- You can restart it by opening Task Manager with Ctrl+Shift+Esc, then search it for "Windows Explorer", right click that and hit "Restart"
@ldl19691031
ldl19691031 / WorkGraphExampleShader.usf
Created August 16, 2024 12:13
UE DispatchComputeShaderBundle example
#include "/Engine/Private/Common.ush"
struct FShaderBundleNodeRecord
{
uint DispatchGridSize : SV_DispatchGrid;
};
#include "/Engine/Shared/HLSLReservedSpaces.h"
struct FUERootConstants
{
@intaxwashere
intaxwashere / customthunkexample.md
Last active January 6, 2026 18:18
Custom Thunks Unreal Engine TL;DR

Custom thunks TL;DR

This smol post assumes you worked on a custom thunk implementation before but no idea how it works, why you're using cursed macros from 1990s etc. If you don't have any programming experience or relatively new to Unreal world, it's likely you might not understand anything from this post, not because concepts are too difficult to grasp, but rather because this post is written for the people who has an understanding of how Unreal works since a while and want to expand their knowledge of custom thunks implementation.

Part 1:

  • A thunk is a function that you can save and call later, so if you had an array of TFunction<void()>s, you would have an array of custom thunks that you can bind/unbind new function pointers to existing TFunctions.
  • Custom thunks of Blueprints are the same, they're a fancy array/list of function pointers. Imagine for each node you placed to graph, Blueprints have a place for that node in it's list of custom thunks. For example the + node in Blueprints that
@MilkyEngineer
MilkyEngineer / Minimal-5.2.uproject
Last active January 12, 2026 13:49
Minimal project descriptor that "Disables Engine Plugins by Default" for Unreal Engine
{
"FileVersion": 3,
"EngineAssociation": "5.2",
"Description": "Minimum viable plugin dependencies for a usable Unreal Engine project",
"DisableEnginePluginsByDefault": true,
"Plugins": [
{
"Name": "PluginBrowser",
"Enabled": true
},
@intaxwashere
intaxwashere / YourProjectEditorModule.cpp
Last active April 25, 2024 11:01
Automatically adding category sections to editor
// add this code to your StartupModule() function of your EDITOR module
// if it doesnt work, try setting loading phase to "postdefault" -- no idea if this will produce side effects though.
// basically idea is looping all CDOs (i.e. UClasses) and their properties, getting their "category" meta value and registering them to
// property sections
FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor");
static constexpr bool bAddSubcategories = false; // you probably want this to be false
auto ProcessCategory = [&PropertyModule](const FName ClassName, const FString& Category)