Skip to content

Instantly share code, notes, and snippets.

Avatar
🕹️
Pushing Pixels

Thomas Sampson tmsampson

🕹️
Pushing Pixels
View GitHub Profile
View ue4_networking_watch_window_helpers.txt
/* --- IS THIS THE SERVER? ---> */ {,,"UE4Editor-Engine.dll"}((UEditorEngine*)GEngine)->PlayWorld!=0 && (({,,"UE4Editor-Engine.dll"}((UEditorEngine*)GEngine)->PlayWorld)->NetDriver)->ServerConnection==0
/* --- IS THIS THE CLIENT? ---> */ {,,"UE4Editor-Engine.dll"}((UEditorEngine*)GEngine)->PlayWorld!=0 && (({,,"UE4Editor-Engine.dll"}((UEditorEngine*)GEngine)->PlayWorld)->NetDriver)->ServerConnection!=0
View ue4_blueprint_callstack.cpp
//------------------------------------------------------------------------------------------------------------------------------
// FOR USE IN VISUAL STUDIO IMMEDIATE WINDOW
//------------------------------------------------------------------------------------------------------------------------------
// Dump Blueprint Callstack (Editor Build)
{,,UE4Editor-Core}::PrintScriptCallstack()
// Dump Blueprint Callstack (Standalone/Package Build)
::PrintScriptCallstack()
View cpp_high_resolution_timer.cpp
//------------------------------------------------------------------------------------------------------------------------------
#include <iostream>
#include <chrono>
//------------------------------------------------------------------------------------------------------------------------------
int main()
{
// Start timer
View uproperty_edit_conditions.cpp
//------------------------------------------------------------------------------------------------------------------------------
// Basic Usage
//------------------------------------------------------------------------------------------------------------------------------
UPROPERTY(EditAnywhere, Category="Demo")
bool MyFlag = true;
UPROPERTY(EditAnywhere, Category="Demo", meta=(EditCondition="MyFlag"))
int MyNumber = 0;
//------------------------------------------------------------------------------------------------------------------------------
// Basic Usage (Inverted)
@tmsampson
tmsampson / cpp_const_usage.cpp
Last active Jul 14, 2020
C++ Const Pointer Usage
View cpp_const_usage.cpp
//------------------------------------------------------------------------------------------------------------------------------
struct MyType
{
int x = 0;
void Mutate() { ++x; }
};
//------------------------------------------------------------------------------------------------------------------------------