ModExtraAssets is no longer getting updated for classic. However, since 2024 there's a MEA Revamped version that fits BepInEx moddding BB+ perfectly!
ModExtraAssets' Loading Standards is the way how to initialize all assets stated by the original developer of that tool
Classic: WarningScreenScript | IEnumerator Start()
Classic Initialization:
If using the tool for the first time:
Go to WarningScreenScript and then edit the class, then find void Start(), then change void to IEnumerator
using System.Collections;
using System.Collections.Generic;
Change entire IEnumerator Start() to
private IEnumerator Start()
{
ModExtraAssets.FindAllDBLoad<AudioClip>(ModExtraAssets.GetSubDirectory("Audio"), "wav", this);
yield return new WaitForSeconds(0.01f);
ModExtraAssets.FindAllDBLoad<Sprite>(ModExtraAssets.GetSubDirectory("Textures"), "png", this);
yield return new WaitForSeconds(0.01f);
ModExtraAssets.FindAllDBLoad<Texture2D>(ModExtraAssets.GetSubDirectory("Textures"), "png", this);
yield return new WaitForSeconds(0.01f);
ModExtraAssets.FindAllDBLoad<Mesh>(ModExtraAssets.GetSubDirectory("Mesh"), "mea", this);
yield return new WaitForSeconds(0.01f);
this.player = ReInput.players.GetPlayer(0);
yield break;
}
Also change void Update() to this to escape errors
private void Update()
{
if (this.player != null && this.player.GetAnyButtonDown())
{
SceneManager.LoadScene("MainMenu");
}
}
I could use WaitForEndOfFrame, but it freezes the game sometimes
WaitForSeconds is used for a small delay, to escape lag spikes for performance
Used to make WaitForSeconds work
Don't go below that line
🔽
this.player = ReInput.players.GetPlayer(0);
Don't go beyond the lines where you load core stuff, like textures, audio and sprites
Always add WaitForSeconds delay after your loading line