# EasySettings.cs

Work In progress

<figure><img src="https://3152232848-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MWHF2U_tfZEUaf_IsL-%2Fuploads%2FgNWd8mgjCB90w9n3fR8A%2FEnableDynamicEvents.png?alt=media&#x26;token=f9e1f6a3-8d21-49a1-9ff5-d1a8151efad1" alt=""><figcaption></figcaption></figure>

#### EasySettings are located at Assets/EasyCodeForVivox/Settings/EasySettings

You can configure Logging, Dynamic Events, Text-To-Speech Voice Gender, and how often User updates/events are invoked/fired.

{% hint style="info" %}
**If using Dynamic Events, you should specify which assemblies you want searched.**
{% endhint %}

I have chosen to only search **EasyCodeForVivox** and **Assembly-CSharp** (default Unity project Assembly unless you create your Assembly Definitions). <mark style="color:orange;">If</mark> <mark style="color:orange;"></mark><mark style="color:orange;">**OnlySearchTheseAssemblies**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">is left blank</mark> <mark style="color:orange;"></mark><mark style="color:orange;">**EasyCode**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">will search all assemblies asynchronously at startup to avoid UI/thread blocking. If there are a lot of Assemblies to search and players start playing the game immediately some Dynamic events may not be registered in time and will not be invoked/fired</mark>

**I had to implement like this** because searching all assemblies inside a project with a lot of assets/packages took a long time (7+ seconds at startup even after ignoring most of Unity's packages/Assemblies)

```
using EasyCodeForVivox;
using UnityEngine;
using VivoxUnity;

[CreateAssetMenu(fileName = "EasySettings", menuName = "EasyCodeForVivox/Create EasySettings", order = 1)]
public class EasySettingsSO : ScriptableObject
{
    [Tooltip("Choose which gender Vivox will use when using Text-To-Speech")]
    public VoiceGender VoiceGender = VoiceGender.female;
    [Tooltip("Hz is how many times per second you want to update Participant Properties")]
    public ParticipantPropertyUpdateFrequency VivoxParticipantPropertyUpdateFrequency = ParticipantPropertyUpdateFrequency.StateChange;
    public bool LogEasyManager;
    public bool LogEasyManagerEventCallbacks;
    public bool UseDynamicEvents;
    public bool OnlySearchAssemblyCSharp;
    public bool LogAssemblySearches;
    public bool LogAllDynamicMethods;
    public bool LogAllAudioDevices;
    public bool LogVoiceActivityDetection;
    public bool LogEasyNetCode;
    public bool LogNetCodeForGameObjects;

}
```
