Skip to content

Instantly share code, notes, and snippets.

View Solessfir's full-sized avatar

Constantine Romakhov Solessfir

View GitHub Profile
@Solessfir
Solessfir / CleanupProject.bat
Last active May 13, 2024 18:56
Fast way to clean Unreal Engine left offs
@echo off
:: This batch file cleans up an Unreal Engine project directory by deleting certain folders and files.
:: It offers three options to the user
:: 1. Will clean Project only
:: 2. Will clean ...AppData\Local\UnrealEngine saved folders
:: 3. Will clean all Unreal Engine related folder in the AppData. This will also remove compiled Shaders for all the projects
setlocal EnableDelayedExpansion
@Solessfir
Solessfir / BuildPlugin.bat
Last active April 20, 2023 16:12
Unreal Engine Standalone Plugin Builder
:: Copyright (c) Solessfir under MIT license
:: This is a batch file that is used to build a plugin for the Unreal Engine.
:: The file first sets the root directory to the current directory of the batch file.
:: It searches for a ".uplugin" file in the root directory and its parent directory.
:: If it doesn't find any ".uplugin" files, it outputs an error message and exits the script.
:: If it finds a ".uplugin" file, it extracts the engine version from the file and looks for the Unreal Engine installation directory in the Windows registry.
:: If it finds the installation directory, it sets the path to the AutomationTool, which is used to build the plugin.
:: If it can't find the installation directory, it outputs an error message and exits the script.
@Solessfir
Solessfir / BuildDDC.bat
Last active April 20, 2023 16:16
Unreal Engine Derived Data Cache Builder
:: Copyright (c) Solessfir under MIT license
:: This is a batch file used for building a "Derived Data Cache" for an Unreal Engine project.
:: A "Derived Data Cache" is a database of preprocessed assets that are used to speed up the development process in Unreal Engine.
:: The batch file searches for a .uproject file in the current directory and its parent directory.
:: Once found, it extracts the EngineAssociation parameter from the .uproject file to determine the version of the Unreal Engine used to create the project.
:: Then it searches the Windows registry for the installation directory of that version of Unreal Engine.
:: Once the installation directory is found, the batch file calls the Unreal Editor with the necessary parameters to build the "Derived Data Cache".
@Solessfir
Solessfir / AdvancedLog.h
Last active April 14, 2023 16:08
Unreal Engine Advanced Log with automatic type deduction
#pragma once
/** Current Class and Line Number where this is called */
#define LOG_FUNC_LINE (FString(__FUNCTION__) + " (Line: " + FString::FromInt(__LINE__) + ")")
/**
* Usage:
* ADVANCED_LOG("Actor name is: {0}", AnyActorPointer);
* No need for GetName() or ToString(), etc. Type will be automatically deduced
*/