Dane,
I've done significant work on your plugin.
I wanted you to have this, because I can't find an official repo for this online to make a pull request I just decided to send you the files in here and I will also post them on the https://dn2.itch.io/editor-discord-rich-presence site in case someone wants to use the code there.
My code changes are as follows:
EditorDiscordRichPresence\EditorDiscordRichPresence.uplugin - to make your plugin engine agnostic and not issue warnings for newer engine verisons, I simply removed the "EngineVersion" field in this file.
I have added the ability for the discord rich presence to be disabled if the editor is not in focus (minimized or not in focus) to not show a status anymore in discord (this is useful for me if i have other RPC calls to other apps).
EditorDiscordRichPresence\Source\EditorDiscordRichPresence\Private\EditorDiscordRichPresence.cpp - I have done several things here, including but not limited to - greatly improved detection for other asset types including if the level is active, blueprint classes, and almost all other classes.
To give you a sense of the mapping here it is
// Map common asset class names to friendly display names
if (ClassName == TEXT("Blueprint_GeneratedClass") || ClassName == TEXT("BlueprintGeneratedClass"))
{
return TEXT("Blueprint");
}
else if (ClassName == TEXT("WidgetBlueprintGeneratedClass"))
{
return TEXT("Widget");
}
else if (ClassName == TEXT("AnimBlueprint"))
{
return TEXT("Animation");
}
else if (ClassName == TEXT("SkeletalMesh"))
{
return TEXT("Skeletal Mesh");
}
else if (ClassName == TEXT("StaticMesh"))
{
return TEXT("Static Mesh");
}
else if (ClassName == TEXT("Texture2D"))
{
return TEXT("Texture");
}
else if (ClassName == TEXT("Material"))
{
return TEXT("Material");
}
else if (ClassName == TEXT("MaterialFunction"))
{
return TEXT("Material Function");
}
else if (ClassName == TEXT("MaterialParameterCollection"))
{
return TEXT("Material Parameters");
}
else if (ClassName == TEXT("Skeleton"))
{
return TEXT("Skeleton");
}
else if (ClassName == TEXT("PhysicsAsset"))
{
return TEXT("Physics Asset");
}
else if (ClassName == TEXT("AnimMontage"))
{
return TEXT("Montage");
}
else if (ClassName == TEXT("AnimSequence"))
{
return TEXT("Animation Sequence");
}
else if (ClassName == TEXT("SoundCue"))
{
return TEXT("Sound Cue");
}
else if (ClassName == TEXT("SoundWave"))
{
return TEXT("Sound Wave");
}
else if (ClassName == TEXT("SoundClass"))
{
return TEXT("Sound Class");
}
else if (ClassName == TEXT("SoundSubmix"))
{
return TEXT("Sound Submix");
}
else if (ClassName == TEXT("Particle"))
{
return TEXT("Particle");
}
else if (ClassName == TEXT("NiagaraSystem"))
{
return TEXT("Niagara System");
}
else if (ClassName == TEXT("NiagaraEmitter"))
{
return TEXT("Niagara Emitter");
}
else if (ClassName == TEXT("DataTable"))
{
return TEXT("Data Table");
}
else if (ClassName == TEXT("CurveTable"))
{
return TEXT("Curve Table");
}
else if (ClassName == TEXT("Curve"))
{
return TEXT("Curve");
}
else if (ClassName == TEXT("LevelSequence"))
{
return TEXT("Sequence");
}
else if (ClassName == TEXT("MetaHuman"))
{
return TEXT("MetaHuman");
}
else if (ClassName == TEXT("Enum"))
{
return TEXT("Enum");
}
else if (ClassName == TEXT("Structure"))
{
return TEXT("Structure");
}
else if (ClassName == TEXT("Dialogue"))
{
return TEXT("Dialogue");
}
else if (ClassName == TEXT("DialogueVoice"))
{
return TEXT("Dialogue Voice");
}
else if (ClassName == TEXT("Converter") || ClassName == TEXT("AssetActionUtility"))
{
return TEXT("Utility");
}
else if (ClassName == TEXT("DM_DataModel"))
{
return TEXT("Data Model");
}
else if (ClassName.Contains(TEXT("Blueprint")))
{
return TEXT("Blueprint");
}
// Remove trailing 'Class' if present and return as-is
if (ClassName.EndsWith(TEXT("Class")))
{
ClassName.RemoveFromEnd(TEXT("Class"));
}
return ClassName;
}
EditorDiscordRichPresence\Source\EditorDiscordRichPresence\Public\EditorDiscordRichPresence.h also has applicable changes for the cpp implementation.
Thanks for your work, attached all files.