ModExtraAssets is no longer getting updated for classic. However, since 2024 there's a MEA Revamped version that fits BepInEx moddding BB+ perfectly!
void CreateMaterial(Texture2D text)
Used to create a material with the texture and store it in the database
using System;
using UnityEngine;
public class Example : MonoBehaviour
{
private void Start()
{
ModExtraAssets.CreateMaterial(ModExtraAssets.Get<Texture2D>("TextureName"));
}
}