Prompt Tips
General Tips
Avoid Unity terminology for gameobjects and components.
Copilot operates on a simplified representation of your scene, and is not trained on Unity components.
Set the Color property on the Image component of gameObject "myImage" to red.
Recommended:
Set the color of myImage to red.
If you want Copilot to solve a problem a particular way, be specific.
Add space between the images.
Recommended:
Use margin to add horizontal space between the images.
Naming
Copilot can read the names of any assets and gameObjects in your Prompt Context. Using descriptive names for assets and gameObjects can help Copilot understand your prompt.
For example, your gameObject is named "Apple", you can say:
Make the apple bigger.
Similarly, if your gameObject has an Image component referencing the "Apple" sprite, this prompt is also likely to work.
Containers
You may need to give Copilot a hint to create a new container when arranging objects. For example, suppose you have a
vertically stacked form with labels and input fields, but you want to place each label to the left of each input field.
With this prompt, Copilot may simply rearrange the whole form horizontally.
Place the labels to the left of the input fields.
Recommended:
Create a new container for the each label and input field with a horizontal layout and 5px gap.
Keywords
Here are some keywords you can use that have worked well for us:
- anchor - "Anchor the red box to the top left of the green box"
- center - "Center the red box in the green box"
- margin - If you want to add space around an element. "Add 5px margin to the left of the red box"
- padding - If you want to add space inside an element. "Add 5px padding inside the blue box"
- space apart - "Space the images apart to fill the width"
- gap - "Set the gap between the images to 5px"
- stack horizontal / vertical - "Stack the images horizontally"
Sizing
Using terms like "bigger" and "smaller" will work, but is unpredictable. Here are some more specific alternatives:
- Pixel Size - "Set the width of the box to 150px"
- Percent Size - "Set the width of the box to 50%"
- Fill - "Set the width of the box to fill the available width"
- Fit - "Set the width of the box to fit the width of its content"
Font Size and Style
When possible, you should use Flexalon Styles to set font size and other text properties.
- Font Size - "Set the quest description text to 12px"
- Font - (selecting a font) "Use this font for the quest description."
- Font Style - "Set the quest description underlined/bold/italic"
- Font Alignment - "Set the text alignment for the quest description to center."
- Match size - "Set the quest description text size the same as the item description"
- Select style - (selecting a style asset) "Set this as the quest description style"
- Match style - "Set the quest description text style the same as the item description"
Colors
You can specify a color by name, but this is not precise.
When possible, you should use Flexalon Styles
to color your text and background, and have the AI use those styles
by selecting them in the Project window.
- Hex Color - "Set the quest description text color to #FF0000"
- Select style - (selecting a style asset) Set this as the quest description style"
- Match color - "Set the quest description background color the same as the item description"
- Match style - "Set the quest description background style the same as the item description"