# Macros

Some of these macros are only functional while in the editor, and some work on both.\
Some of these macros are meant for .cpp files and placed in the global scope. The rest can be placed inside of regular code.

```cpp
Omni_InsightsTrace_Str("My insights trace")
```

* Wrapper for `TRACE_CPUPROFILER_EVENT_SCOPE_STR`

```cpp
Omni_InsightsTrace()
```

* Wrapper for `TRACE_CPUPROFILER_EVENT_SCOPE(__FUNCTION__)`. If the function this macro is inside of is called `Bar` and the class is named `Foo`, this will display as `Foo::Bar` inside Unreal Insights

```cpp
Omni_OnModuleStarted("AIF_Mass")
{
    UE_LOG(LogTemp, Warning, TEXT("AIF_Mass module has started"));
}
```

* This macro will trigger the code beneath it whenever the specified module is started. You can find module names inside of a plugins `.uplugin` file.
* Place in .cpp file and in global scope.

```cpp
Omni_SetClassIcon(
AgentIntelligenceFramework, /*Plugin name*/
AgentGameplayEffectConfig, /*Class name (No U prefix)*/
 EffectIconSlate) /*Name of SVG inside of plugins resource folder*/
```

* Automatically assigns an SVG (must be inside the plugins `Resource` folder) for a class as the class icon and class thumbnail.
* Place in .cpp file and in global scope.\\

  <figure><img src="https://3180859593-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHaVAFyKjs3d16ljfQ2o0%2Fuploads%2Fw8orwRVs0y6SVmuSxhik%2Fimage.png?alt=media&#x26;token=a9c01cae-93cf-49a1-9766-8d87fd876b1c" alt=""><figcaption></figcaption></figure>
