Saltar al contenido principal

Creating Addons

To create your own modules you can inherit from the TabletModule class. For best results dont call your initial functions on Start(), instead use OnInitialize().

Making Addons Available on the Main Script

The main scripts loads its modules from 2 ScriptableObjects, the AvailableModules one holds the prefabs that will be added, and the AvailableCategories holds configurable categories using ModuleNames.

nota

It is not needed to add your module to AvailableCategories, it will appear under Uncategorized if none was found.

Examples

Simple Initialization Check

public SomeFunction(){
if (!Initialized)
{
tablet.notificationSystem.CustomLog("MyModule >> Module not initialized yet!");
return;
}
// rest of the code...
}
tip

We use tablet.notificationSystem.CustomLog instead of Debug.Log to add support for VUdonLogger and respect the user debug settings.

Simple Permission Check

[SerializeField]
string[] permissionTags;

public SomeFunction(){
if(!tablet.CheckAccess(permissionTags)) return;
// rest of the code...
}
nota

The tablet handles the missing permission error message.