Avatar

stelabouras

The Unity Library

Sunday, March 15, 2020

...or how to write a simple static website generator in a day.

Ten days ago I launched a simple project called 'The Unity Library'.

The Unity Library is a small, curated collection of Unity related tutorials, posts and tips that I kept for personal reference, which I decided to make public as a means of giving back to this amazing community.

Here's the announcement originally posted on Twitter:


Over the past few months, I have been h̶o̶a̶r̶d̶i̶n̶g̶ collecting and organizing Unity related posts, shaders, tutorials and tips from game developers and designers I follow, respect and look up to.

Although this was created just as a personal reference, I have decided to build a public website & host this information for anyone interested in taking a deeper dive in subjects like Raymarching, Lava or Snow rendering, Tool shading, Sea and Water shaders and many more.

Let me emphasize this: This project wouldn't be possible without creators like AlanZucconi, catlikecoding, Cyanilux, febucci, HarryAlisavakis, TheAllenChou, minionsart, andre_mc, totallyRonja, ManuelaXibanya, DanielJMoran and so many others.

If you happen to be a Unity game developer, I would strongly suggest following the aforementioned accounts; I have learned so much from those people over the past few months and I really want to thank them for sharing their knowledge.

Here's the link to the project: https://unity.stelabouras.com

I hope you like it. This library will be updated with new links every time I find something interesting and useful!

Finally, I want to dedicate this project to my beloved grandpa, who recently passed away. ♥️


The response was quite overwhelming and definitely disproportionate to the amount of time I spent building it! 🥰

The whole idea started when I noticed that a collection of Unity-related links I was maintaing, was growing significantly in number on my Linkpack folder and I needed a separate searchable interface which I could consult often without having to go through my files. So I began grouping those files into folders and ended up creating a simple parser script to generate the library structure.

I reused some simple logic already implemented in Python on the server-side of Linkpack, so that I could extract the necessary information from the file structure into a JSON format. The script was aptly named the ..."Librarian", as it was tasked with traversing the whole folder, parsing the files, extracting the links, checking the Open Graph tags of the website, storing the url in the Wayback Machine, and finally storing the whole library JSON structure into a separate file.

After that, I created a simple generator script that was responsible for creating the whole static website from that JSON script, by generating the proper folder structure, building the HTML files, copying the static CSS and JS I have coded to style the pages correctly and getting the whole JSON structure loaded in Javascript so that the whole website is searchable.

For hosting the project, I picked the trusted Netlify service, the same service this very blog is hosted at!

Overall 'The Unity Library' was a rather fun little project and something that I keep improving those days whenever I have a chance.

Update! The Unity Library is now open source under a MIT license! You can find the project at Gitlab where you can file an MR if you have an interesting link that can be included at the library!