Pizza box is a unity package that you can stick in your project to easily load poly.pizza models at runtime. Poly pizza is a website that hosts thousands of free low poly models under CC0 and CC-BY licenses. You can view the API docs here.
The package also includes an example (under the samples tab in package manager) of how you might load, scale, position and generate colliders in the Unity game engine (it's harder than you think!)
Requires Unity 2019.3+
- Make sure git is installed on your system
- Install Unitask
- Open the package manager and click "Add from Git URL"
- Paste this url
https://github.com/Chikanz/pizzabox.git - Get your API key from here (you'll need an account).
- Add the API manager script to your scene and paste the key in
The API manager provides a few methods for finding and loading models. First you'll need to decide what models you'd like to load. There's a few methods for this:
-
GetPopular(int limit)- Get an array of the most popular models on the site up to thelimityou specify. -
GetExactModel(string keyword)- Search for a model matching yourkeywordexactly. This is useful if you know what you want to load (like an apple or a monkey) but don't know the exact model. -
GetModelByID(string id)- Get a model by it's unique ID. (crazy ik)
Once you've got the model data from the api you can make it into a gameObject with the MakeModel(Model model, float scale = 1, bool positionCenter = false) Positioning the model is tricky since the models origin can be totally fucked. Check out spawner.cs to see how to position objects where you want them using GLTFBounds.

