# DevToolUtility

DevToolUtility static class which allow you access to low level API.

**Namespace:** `RenownedGames.DevTool`

## Methods

### GetRootDirectory

{% tabs %}
{% tab title="Description" %}
Collected root directory.
{% endtab %}

{% tab title="Arguments" %}
None
{% endtab %}

{% tab title="Retrun" %}
`Directory`
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
*For performance reasons, it is recommended to not use this function every frame. Instead, cache the result in a member variable at startup.*
{% endhint %}

```csharp
public static Directory GetRootDirectory();
```

### CreateCommand

{% tabs %}
{% tab title="Description" %}
Create command instance by specified member.
{% endtab %}

{% tab title="Arguments" %}

1. `MemberInfo`: MemberInfo reference
2. `Instance`: Instance of member info, only for non-static members
3. `Path`: Path to command
4. `Order`: Command order
5. `Command`: Output reference of command instance
   {% endtab %}

{% tab title="Return" %}
`Bool`: True if command possible to create.
{% endtab %}
{% endtabs %}

```csharp
public static bool CreateCommand(MemberInfo memberInfo, Object instance, string path, int order, out Command command)Properties
```

### CombinePathToInstance

{% tabs %}
{% tab title="Description" %}
Combine command path to specified Object instance.
{% endtab %}

{% tab title="Arguments" %}

1. `Instance`: Command Object instance.
2. `Path`: Path to command
   {% endtab %}

{% tab title="Return" %}
`String`: New path to specified Object.
{% endtab %}
{% endtabs %}

```csharp
public static bool CreateCommand(MemberInfo memberInfo, Object instance, string path, int o
```

## Properties

### Commands

{% tabs %}
{% tab title="Description" %}
Enumerate through all commands in project.
{% endtab %}

{% tab title="Return" %}
`IEnumerable<Commands>`
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
*For performance reasons, it is recommended to not use this function every frame. Instead, cache the result in a member variable at startup.*
{% endhint %}

```csharp
public static IEnumerable<Command> Commands;
```

### OrderedCommands

{% tabs %}
{% tab title="Description" %}
Enumerate through all commands in project ordered by priority.
{% endtab %}

{% tab title="Return" %}
`IEnumerable<Commands>`
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
*For performance reasons, it is recommended to not use this function every frame. Instead, cache the result in a member variable at startup.*
{% endhint %}

```csharp
public static IEnumerable<Command> OrderedCommands;
```
