Custom modules
There are default modules inside some of the packages like Core Module, Ads Module, Analytics Module, IAP Module and NTesting Module. But you can create your own.
Warning
The Homa Console only displays modules that are installed on the project. If certain modules are missing, it indicates that the SDKs are not updated to their latest version for this project.
Homa Console allows you to create your own modules and use them within the console.
Here is how to create a module on the Homa Console:
Create a new assembly for your module
This assembly must have the following settings
The assembly definition reference is needed to be able to use the Homa Console runtime in your module.
The Version Defines are here to let you compile your code only if the homa console is imported in your project. You can even filter by homa console package version.
Implement your HomaConsoleModule
Here's how to create an empty module:
using System.Collections;
using System.Collections.Generic;
using HomaGames.HomaConsole;
using UnityEngine;
// Implementing IHomaConsoleModule interface is enough for Homa Console to register your module implementation
public class MyAwesomeModule : IHomaConsoleModule
{
public string Name => "My Awesome Module";
private VisualElement _root;
public VisualElement Root => _root ?? new VisualElement();
public virtual bool SupportsInGameDisplayMode()
{
return false;
}
public void SetDisplayMode(DisplayMode displayMode){}
}
Use our custom controls
Inside the Homa Console assembly, you will find a lot of useful VisualElement component to use for your module.
In the namespace HomaGames.HomaConsole.AppUI, we have a fork of Unity AppUI package.
To have a Homa styled button in your custom modules, you can do:
using System.Collections;
using System.Collections.Generic;
using HomaGames.HomaConsole;
using HomaGames.HomaConsole.AppUI;
using UnityEngine;
public class MyAwesomeModule : IHomaConsoleModule
{
public string Name => "My Awesome Module";
private VisualElement _root;
public VisualElement Root => _root ?? new Button(){title = "My awesome app ui button"};
public virtual bool SupportsInGameDisplayMode()
{
return false;
}
public void SetDisplayMode(DisplayMode displayMode){}
}
Check your implementation is recognized
By implementing the IHomaConsoleModule interface, you should see your module appearing in the Homa Console settings: