Add Helper Methods for Scene Loading#93
Conversation
BoneLib/BoneLib/HelperMethods.cs
Outdated
| MelonCoroutines.Start(FadeIntoLevel(new Barcode(levelBarcode), new Barcode(loadLevelBarcode), fastFade)); | ||
| } | ||
|
|
||
| private static IEnumerator FadeIntoLevel(Barcode level, Barcode loadScene, bool fastFade = false) |
There was a problem hiding this comment.
Method has errors, fixed:
private static System.Collections.IEnumerator FadeIntoLevel(Barcode level, Barcode loadScene, bool fastFade = false)
{
if (fastFade)
{
SpawnCrate(CommonBarcodes.Misc.LoadFadeFast, Vector3.zero);
yield return new WaitForSeconds(0.5f);
}
else
{
SpawnCrate(CommonBarcodes.Misc.LoadFade, Vector3.zero);
yield return new WaitForSeconds(2);
}
LoadLevel(level.ID, loadScene.ID);
}There was a problem hiding this comment.
Thanks, should be fixed now!
HAHOOS
left a comment
There was a problem hiding this comment.
Tested (pressed the "Load Random Level" in the DefaultMenu which was updated to use FadeLoadLevel. I do not believe it needs more testing than that as most of the code is the same), seems to work just fine
|
Does this feature work on Quest? I know that it may work fine on PCVR due to the |
|
Tested on Quest, the |
|
Fantastic, I'll merge this soon! I'll have to examine the merge conflicts though and test the functionality out. |
|
I believe I fixed the merge conflicts by merging from upstream and fixing the conflicts. Still new to contributing on GitHub so let me know if there is anything I missed, but it should hopefully be good now. |
Also added the two types of LoadFade barcodes to CommonBarcodes
(this was all done on a chromebook via vscode, there may be errors and stuff)