Aladdin is a Unity plugin uses AI to assist developers in writing code and generating textures. It aims to make the development process faster and more efficient.
- Unity 2020.3 or newer
- An active internet connection to use AI services
- Open your Unity project.
- Download the latest package from Release section.
- Import the package into your project.
- You're ready to experience the power of AI!
- Navigate to
AladdinUnity -> Resources
folder and findDefaultOpenAISetting
asset file - Set your OpenAI API key and start creating with AI!
The code generation feature helps developers to write C# code or Shader by inputing prompt. To use it, follow these steps:
- Open the AI Code Helper window by going to the menu bar, select
Aladdin Unity -> Script Generation
. - Select the script type you want to generate
- Enter a brief description of what you want your code to do in the "Script Prompt"
- Click the "Generate Script" button and save the generate script in the desire location.
The Texture Generator feature allows developers to generate textures quickly and easily, all within Unity. To use it, follow these steps:
- Open the Texture Generator window by going to menu bar, select
Aladdin Unity -> Texture Generation
. - Choose the type of texture you want to generate from the "Texture Size" dropdown menu.
- Click the "Generate Texture" button to generate your texture in your desire location.
// Instantiate ChatGPTHelper
AladdinScriptGenerator aladdin = new([OpenAiSetting]);
// Generate script
aladdin.GenerateScript([script prompt], [script type]); // Coroutine
// Instantiate DalleHelper
AladdinTextureGenerator aladdin = new([OpenAiSetting]);
// Generate texture
aladdin.GenerateTexture([texture prompt], [texture size]); // Coroutine
I'm planning to make Aladdin Unity a general purpose plugin (not just Unity development tooling) that developers can use in their Unity application to quickly get generative AI up and running. In fact, I'm currently using Aladdin Unity to make my own Unity app and will continuously improve it based on my experience.
Feel free to contribute and make the plugin more developer-friendly and accessible to everyone!
If you encounter any issues with the plugin, please make sure that you have an active internet connection and that you're using the latest version of Unity. If you continue to experience issues, please get in touch with me,
This plugin is licensed under the MIT License. See LICENSE.txt for more information.