This is a implementation of an ai generative gacha system. Using stable-diffusion-webui's api feature to generate image and send it to Unity's UGUI.
Package ref: dobrado76/Stable-Diffusion-Unity-Integration
You can find more feature with webui api here
- Run webui-user.bat with COMMANDLINE_ARGS=--api. You can edit it with Notepad or any editor you like.
- In MainScene, browse to StableDiffusionConfiguration in hierarchy and click List Models in StableDiffusionConfiguration script at inspector.
- Browse to Canvas/ImageResult in hierarchy, and set generation settings that you need in StableDiffusionText2Image script at inspector.
- You're good to go! Try click the button to gacha in playing mode.
*It's recommended that choose sampler labeled with "a". This will generate some random things in every gacha.