Skip to content

Instantly share code, notes, and snippets.

@CSEliot
Created May 14, 2026 21:46
Show Gist options
  • Select an option

  • Save CSEliot/1d43856f8183d11a26a02a47d27eb245 to your computer and use it in GitHub Desktop.

Select an option

Save CSEliot/1d43856f8183d11a26a02a47d27eb245 to your computer and use it in GitHub Desktop.
How to simply fire editor code (independent of PlayMode) to support your development.
using Sandbox;
public sealed class FireCode
{
[EditorEvent.Frame]
public static void OnEnterPlayMode()
{
Log.Info("This is executed PER FRAME");
if (Game.IsPlaying)
{
Log.Info("CAN U FEEL IT NOW MR CRABS");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment