Posted March 30, 2021 by Brent Morris
#invector #bugs #pause menu #quest machine
Changelog:
Another update but it's tiny. You can now press escape to bring up a pause menu, letting you resume or quit. I also wanted a restart function (it's currently possible to get stuck on level geometry), but I'm currently getting a bug where it restarts but the camera can't find the player (alternately, the camera works but none of the guns work - I'm going in circles a bit so not sure which bug suggests the right track). I think it's related to another bug I'm encountering with Invector's portal prefab. The intent is to have a portal you can step through and load another level. At the moment, I can't figure out why it isn't working. I'm going to write to the asset publisher to see if they can help, I have a barebones example working, but then it doesn't work in my real level and I have no idea why. Now when I say bug, I don't blame the asset publishers, this is almost certainly a me problem and I'm not seeing what I'm doing wrong.
I'm posting this as a way to feel like I've done something but currently I'm experiencing the demoralizing feeling I get when I can't work out a bug and feel dumb. But this is a stupid simple demo and I'm going to figure this out eventually.
One thing I'm considering is looking into Quest Machine, I intend to use it eventually for generating quests and managing save states. I'm wondering if I should stop bothering with this Invector Portal issue and try to figure it out with QM. I imagine my issues with the camera will still be there in QM.
Useful Links
Useful Snippet (I cannot find the URL where I got this in my history, apologies)
This is for using UnityEvents for pausing functions, not sure if it's a good idea or not.
using UnityEngine.Events;
public UnityEvent PauseEvents;
public UnityEvent UnPauseEvents;
PauseEvents.Invoke();
UnPauseEvents.Invoke();