Hey there! Really weird issue, and I'm fairly new to Unity, so sorry if I don't describe it super well.
I'm working past the end of the Tower Defense tutorial, and I've been working on adding an in-Editor Editor, for making my own maps and whatnot. I managed to get most of it working, but I'm having a small issue.
Right now, I can click a button to make my path for me, and it'll add the Start, End, color the paths in between, and add all the right waypoints in the right order from a selection of nodes in the scene. Because I'm using a custom editor interface, I'm tracking what's been made so far. I have a private variables path that is for the gameObject that is the parent of all the path-related gameObjects being spawned, for easy sorting and cleanup. When I'm in the editor it keeps track of whether the path has been made or not, and disabled certain buttons based on that.
The problem is when I go to play, path goes to null, and my public getter PathIsMade returns false instead of true. Exiting playmode to the editor doesn't restore it either.
It's not a huge deal, with the way my editor script is set up I can fix the state-sync issue by hitting one or two more buttons, but I would like to get it figured out. I'm making this my learning project, so I don't want to leave any issue undone if I can help it.
Here's the code! Let me know if there's any more information I can add.