Runtime Usage

You can also expose Sloyd's AI prompting and editing in playmode and have players of your game or application create with Sloyd.

Creating a Sloyd Object with a Text Prompt

Call SloydSceneObject.Create() to request creating a 3D model. The method has two parameters:

  1. Required string prompt

  2. Optional SloydClientAPI.PromptModifier modifier:

    1. If you want to get an AI textured model, pass SloydClientAPI.PromptModifier.Texturing.

    2. For recognition coloring instructions in your prompt by AI, pass SloydClientAPI.PromptModifier.ReColoring.

    3. If you skip modifier argument or pass SloydClientAPI.PromptModifier.None, a 3D model will be painted with its default palette colors.

Note: the method is asynchronous

SloydSceneObject sceneObject = await SloydSceneObject.Create(textPrompt, SloydClientAPI.PromptModifier.Texturing);

Editing a Sloyd Object with a Text Promt

SloydSceneObject is a MonoBehaviour component attached to each spawned model. Call SloydSceneObject.Edit() to request editing a spawned 3D model with another prompt.

Note: The method is asynchronou

await sceneObject.Edit(textPrompt);

Last updated