> For the complete documentation index, see [llms.txt](https://kdoore.gitbook.io/cs2335/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kdoore.gitbook.io/cs2335/project-2-dialog/conversation-entry.md).

# Conversation Entry

## ConversationEntry

Below is the code for a simple class that has elements for each ConversationEntry: Since we use the **Class-Level Attribute: \[System.Serializable],** then we'll be able to display and populate each **ConversationEntry** in our list in the inspector panel.

Each ConversationEntry corresponds to one instance of conversation dialogue.  The class defines the data elements that are associated with a single chunk of conversation:  speakerName, speakerImage, dialogTxt.  Notice that the class does not contain any methods.  Notice the variable-level **\[TextArea] attribute,** this will create a larger input field in the inspector when creating each piece of conversation dialogue.

**Create an instance of this C# script** in your Unity project, paste the code below into the script within Visual Studio.&#x20;

```java
using UnityEngine;
using UnityEngine.UI;
using System.Collections;

[System.Serializable]
public class ConversationEntry
{
    public string speakerName;

    [TextArea]
    public string dialogTxt;

    public Sprite speakerImg;
}
```
