What a night!


Unity does strange things huh?
As someone who doesn't use Unity very frequently, in favor of other game engines such as Godot. Allow me to take you on a journey to 12:45 AM July 21. This game jam is definitely not my first rodeo, it's even my third one with Unity itself. As a person who doesn't read through the entire docs before starting a project, which surely starts me off on a path to success. I find myself in constant moments of fear of Unity.
Our game premise relies on the ability for the player to record a scene, and play it back, in his/her game because they are a movie director. Taking screenshots of a camera would be easy enough, just throw them in the Resource folder. I haven't ever personally wondered how to create an mp4 in a game engine but I figured it must be do able. So I set out to find a way to encode videos, I first thought it would be easiest to use python and run a Python script in Unity. That was naive, after seeing that it was technically possible. My choices of doing so were paying $99 for an asset that included a Python compiler built and implemented into Unity or following a four page tutorial on how to install it. nothankyou
However I found that there is such a thing called MediaEncoder! Thank goodness! A way to make an mp4 in Unity! Seasoned Unity fans are more than likely shaking their head already. After finagling for a day and half getting this to work, by converting raw images to textures, but then the format was wrong, so I had to format the textures by copying the pixels into yet another texture for the MediaEncoder to finally say -
Eh, I'll take these
Only to find out that MediaEncoder is a UnityEditor file only, which, fun fact, means it wont build.
After scrambling to fix that by assembling a 'MovingPictureShow" script which literally shows all the image in the right fps as though it was a recording. At this point I thought my team and I were good for gold, the hardest technical part of this was solved.

But no,

Fast forward to the day the jam is due. Finishing models, doing some test builds to make sure everything looks good. Our team will be done by 8:00PM! Well we really got done at 8:30 but that's pretty good. I took to the internet to share the creation, after all I'm pretty proud of this one. I think the team came together really well to make something unique. And then I tell the artist to come try the game! After all she hadn't even played it yet. The build that was created, that worked perfectly when I just opened it, crashed and would not open. It is now 10:00 PM. The only thing I have left to go on is a shader file is missing.
I spend 1 hour and 50 minutes googling why a Unity build would break after only one run. Or googling 'why would my file delete itself.' Many reasons showed up for Unity 4. something and a Facebook API. At 11:50 I call the sound designer for our game asking him to build it just in case. Then it dawned on me, I am deleting files programmatically in my code.

While creating this app since we were creating images dynamically and so that means a lot of Unity refreshing its assets. So I decided to write a little script to clear all the files in the Resource folder on close of the app. This project uses exactly one custom shader. Fun fact about shaders, when you build a project that uses custom shaders they get moved to the Resource folder. Welp, I got 10 minutes, applied a quick code change, uploaded to itch. Wrote a devlog about it so I wont mull over this and stay awake, work starts in 7 hours.

Files

Studio237_1.0.zip 41 MB
Jan 21, 2020
Studio237_v1.3.7z 45 MB
Jan 21, 2020
Studio237_v1.4.zip 56 MB
Jan 21, 2020

Get Studio237

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.