Skip to content

Instantly share code, notes, and snippets.

View AndreaCatania's full-sized avatar
🍇
Hey!

Andrea Catania AndreaCatania

🍇
Hey!
View GitHub Profile
@AndreaCatania
AndreaCatania / Readme.txt
Created May 4, 2024 08:37
Compile thirdparty library using CMake - Appendix
Readme.txt
@AndreaCatania
AndreaCatania / ModifyEnumNamesAtRuntimeInUE5.cpp
Last active August 16, 2024 22:54
How to modify Enum names at runtime in Unreal Engine 5 and Unreal Engine 4
// Define your enum as usual inside an Header file.
UENUM()
enum class EMyEnums : uint8
{
MyEnum1,
MyEnum2,
MyEnum3,
MyEnum4,
MyEnum5,
};
@AndreaCatania
AndreaCatania / MBuildUtils.cs
Last active April 20, 2024 10:40
Utility used to execute console commands (like the one to compile CMake projects) during the compilation steps of Unreal Engine.
// Utility used to execute console commands (like the one to compile CMake projects) during the compilation steps of Unreal Engine.
public class MBuildUtils
{
public string MModulePath = "";
// Taken from UE4Cmake - Kudos to `caseymcc`
private Tuple<string, string> GetExecuteCommandSync()
{
string cmd = "";
@AndreaCatania
AndreaCatania / difftool.py
Created June 4, 2023 18:44
UnrealEngine difftool executor
#!/usr/bin/python
## DESCRIPTION:
## This script is an utility that simplifies the UE-diff-tool usage via git.
##
## HOW IT WORKS:
## Git provides the possibility to use thirdparty tools to DIFF and MERGE the files.
## Unreal provides both tools for the binary `.uasset`.
## By following the SETUP section, you will be able to use the `git difftool -t UE_Diff`
extends Node3D
var player_query: DynamicQuery
var animation_tree: AnimationTree
var root_state_machine: AnimationNodeStateMachinePlayback
func _ready():
# Build the player query used to fetch the player status.
player_query = DynamicQuery.new()
@AndreaCatania
AndreaCatania / importer.gd
Last active July 12, 2021 14:48
Godot 4 automated material assigner
## License MIT
##
## This Post Import script automatically assign the
## material to the Mesh if it's found inside the
## `res://materials` directory.
##
## # How to use
## To you use it, you need to set this script as Post Import script
## on the file.fbx or file.glb.
##
@AndreaCatania
AndreaCatania / godot_expose_utils.h
Last active June 2, 2023 15:53
Header that defines some utility macro that allows to expose C++ class parameters to Godot editor.
/// This file is an utility to avoid write the same code over and over to expose
/// the variables in Godot.
/// To use it you can include this into your header, and use `SETGET` to define
/// the variable you want to expose:
/// ```
/// #include "scene/3d/node_3d.h"
/// #include "godot_expose_utils.h"
///
/// class TestNode : public Node {
/// GDCLASS(TestNode, Node);
@AndreaCatania
AndreaCatania / FlyCam.gd
Last active January 7, 2022 10:55
Godot Fly camera utility - Single file
extends Camera3D
class_name FlyCamera
## Simple Fly Camera for Godot Engine 3.x / 4.x.
## This Fly camera can be moved using the mouse and keyboard "WASD".
## You can toggle this camera activation by pressing the TAB key.
## The idea is to put this camera as autoload.
## It's possible to customize it by changing: The mouse `sensibility` and camera `speed`.
##
## If you want to contribute, please leave a comment, I'll update the code.
##
@AndreaCatania
AndreaCatania / FBX_edges.md
Last active March 28, 2023 21:52
Explanation on how the edges are stored into the FBX.

FBX format - Unique Edges

How the edges are stored into FBX?

How to parse the edges from FBX?

Let's consider this geometry:

Objects:  {
	Geometry: 140696156120336, "Geometry::", "Mesh" {
		Vertices: *18 {
 a: -1,-1,0,1,-1,0,-1,1,0,1,1,0,-1.00631749629974,2.97582387924194,-0.0179548189043999,0.993682563304901,2.97582387924194,-0.0179548189043999