Coplay is designed to understand natural language, but structuring your requests in certain ways can help you get better and more accurate responses. This guide will help you communicate effectively with Coplay in Unity.

Request Types

Here are the main types of requests you can make to Coplay:

Questions

Best for when you need information or explanations.

"How do I implement a jump mechanic in Unity?"
"What's the difference between Update and FixedUpdate?"
"Why is my raycast not detecting collisions?"

Be specific with your questions. The more details you provide, the more tailored Coplay’s response will be to your situation.

Code Generation

Ask Coplay to write code for you by clearly stating what you need.

"Write a script for a third-person camera controller"
"Create a health system with damage and healing functions"
"Generate a JSON parser for my save game data"

Code Analysis

Share your existing code for Coplay to analyze, explain, or improve.

"What's wrong with this code? [paste your code]"
"Optimize this function for better performance: [paste function]"
"Explain how this script works: [paste script]"

Text Formatting for Better Results

Formatting your messages can help Coplay understand your needs better.

TechniqueHow to use itExample
Be specificInclude details about your goal”Create a script that makes the camera follow the player with smooth damping and height offset
Use sectionsSeparate different parts of your requestContext: I’m making a 2D platformer. Question: How should I handle wall jumping?”
Provide contextExplain your project setup”I’m using Unity 2022.1 with the URP rendering pipeline and need help with…”

Effective Prompting Techniques

Step-by-Step Instructions

When you need Coplay to help with a complex task, break it down into steps:

"I want to create an inventory system. First, help me design the data structure.
Once that's done, I'll ask for help implementing the UI."

Iterative Refinement

Start with a basic request and then refine it based on Coplay’s response:

Initial: “Create a player movement script”

Follow-up: “That’s good, but can you modify it to include sprinting when the Shift key is pressed?”

Code Examples

When sharing code with Coplay, use code blocks to make it easier to read:

// Ask about this code
void Update() {
    if (Input.GetKeyDown(KeyCode.Space)) {
        rb.AddForce(Vector3.up * jumpForce, ForceMode.Impulse);
    }
}

Unity-Specific Terminology

Using accurate Unity terminology helps Coplay understand exactly what you’re asking:

General TermUnity-Specific Term
3D objectGameObject
PropertyComponent, Parameter, or Field
ScreenScene, Game View, or UI Canvas
Code fileScript or MonoBehaviour

Mathematical Expressions

Coplay can understand mathematical expressions, which is useful for game physics and graphics questions:

F = m \times a
"How do I calculate the force needed to make my object jump to a height of h
using the formula F = m × a?"

Sample Conversation Flow

Here’s an example of an effective conversation with Coplay:

You: I’m trying to make an enemy that patrols between waypoints. Can you help me with the script?

Coplay: [Provides basic patrol script]

You: Thanks! Now how can I make the enemy detect and chase the player when they get close?

Coplay: [Builds on previous script to add player detection and chase behavior]

You: One last thing - how do I make the enemy return to patrolling when it loses sight of the player?

Coplay: [Completes the AI behavior with returning to patrol functionality]

Join Our Community

For more tips on effectively using Coplay, join our Discord community where you can share your experiences and learn from other users.