More important than creating an Instagram post showcasing my particle metaballs (and more feasible since I’m currently at the office with no Kinect sensor) is creating an in-game settings menu I can use to toggle various scene settings on the fly directly from play mode. I wrote up a nifty prompt for Claude and crossed my fingers…
Prompt
I use a scriptable object to create scene setting profiles that i swap in and swap out to control variables in my game. This approach is inferior to an on the fly popout menu I could access from directly within my game using a keyboard shortcut such as “m” for menu. I love to have the ability to control these parameters using an on screen overlay that i would place in the screen-space canvas i use in my game scene. Some of these variables are animation curves, so i’d need a way to view and set curves. Can we use the Unity UI Toolkit for this? Or is there a better, free and open source option?
A big issue I have with using scriptable objects for my game setting configs is that any changes i make to a SO are permanent. So if i were to exit play mode after making changes, those changes will stick and not reset to what they were before i hit play. I’d like this popout settings menu to be able to load profiles and also be able to specify when to save updates to a profile or save a new profile. That way, the user has full control of settings and doesnt have to worry about losing good settings just because they wanted to try tinkering with defaults.
Hitting “M” on my keyboard brings up a menu now.
Not bad at all! I’m able to create, save, and load profiles; furthermore, tweaking the variables works in real time during gameplay.
I made some adjustments to the CSS so that the bottom portion of the menu doesn’t get clipped.
Next, I wanted to ensure I could also tweak the volume profile settings in my scene from play mode. I found a working script for modifying volume settings during runtime here, passed it to Claude, and voila!—on-the-fly profile control!
By the way, the fullscreen width and tabbed categories are pretty nice upgrades :D
There are two issues I still have with my setup. The first one is my inability to edit animation curves in a sensible way. I should be able to at least see what my curve looks like and save its profile to the presets.
Secondly, the volume profile changes I make using the pop up menu don’t stick in the inspector after play mode. This makes for a confusing experience.
I finally got saved volume settings set in the pop up menu to stick after exiting play mode. I really thought Claude was gonna crap out on this one after over 20 prompts, but it didn’t. At one point, I surpassed my Pro plan’s daily usage limit and was told my credits would reset at 6pm. Then, I looked at the time, and it was 6pm. Epic.
Fixing the animation curves in my settings menu is next up, but I’m calling it quits for today.
Tags: unity gamedev scripting claude post-processing ux animation