-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0773745
commit a1a4179
Showing
3 changed files
with
47 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,63 @@ | ||
# charisma-sdk-unity | ||
Unity SDK for Charisma.ai | ||
|
||
If you have any questions or issues, please contact me at; oscar@charisma.ai | ||
If you have any questions or issues, please contact me at: oscar@charisma.ai | ||
|
||
<h2> 1. Importing / Installing </h2> | ||
### 1. Importing / Installing | ||
|
||
Download the contents of this repo, extract it to a folder of your choice and then import the folder to your Unity Project | ||
|
||
<h2> 2. Settings </h2> | ||
### 2. Settings | ||
|
||
In the resources folder within the CharismaSDK, there is a file named Charisma Settings. This file contains all the information the plugin will use to interface with Charisma. Setting this file up correctly is important. This file needs to be referenced somewhere | ||
in your project for the settings to be properly loaded. After that, they can be referenced anywhere from within your scripts through the "Instance" property. | ||
in your project for the settings to be loaded properly. After that, they can be referenced anywhere from within your scripts through the "Instance" property. | ||
|
||
<b> 2.a StoryId </b> | ||
The following sections describe what each of the separate fields are for. | ||
|
||
**2.a StoryId** | ||
|
||
The Id of the story that you want to play. Each story has a unique Id. Navigate to the Charisma website, click the story you want to play from Unity. The story id can be found in the URL in the following location: | ||
"https://charisma.ai/stories/>storyId<". | ||
|
||
|
||
![StoryId](https://i.ibb.co/sPqS9n2/StoryId.png) | ||
|
||
* **2.b Story Version** | ||
|
||
This is the version of the story you want to play. | ||
|
||
* To play the latest published version, keep this at 0. | ||
|
||
* To play a specific, published, version of your story, set the number to that particular version. | ||
|
||
The story that you want to play. The story id can be found in the URL in the following location; | ||
"https://charisma.ai/stories/<StoryId>" | ||
* To play the draft version, set the number to -1. To do this, you must also supply a Debug Token. More on how to get your Debug Token below. | ||
|
||
<b> 2.b AudioConfig </b> | ||
**2.c AudioConfig** | ||
|
||
The output format of the audio received from Charisma. the default audio format is Ogg. | ||
Unless there are specific requirements that mean the format has to be Wav, I recommend keeping it as Ogg. | ||
|
||
Audio can be received both as an audio clip (buffer) and a URL. | ||
|
||
<b> 2.c Token </b> | ||
**IMPORTANT:** Wav files can only be generated on Windows. Having this option selected on any other platform will result in an error. | ||
|
||
If you want to debug your draft version (Unpublished), the StoryId needs to be set to -1 and "IsDebugging" checked. | ||
**2.d Debug Token** | ||
|
||
If you want to debug your draft version (Unpublished), the Story Version needs to be set to -1 and "IsDebugging" checked. | ||
You also need to retrieve your token from the Charisma website. To do this, go the Charisma website, right-click to inspect the site, | ||
navigate to storage and copy the access token to the "Debug token"-field. | ||
|
||
<h2> 3. Example </h2> | ||
**IMPORTANT:** This token renews every month or so. If you are having trouble accessing your draft version, check if the token has been renewed. | ||
|
||
![Token](https://i.ibb.co/hfJk0H7/Token.png) | ||
|
||
## 3. Example | ||
|
||
I've created a small example for you to be able to understand how the startup flow works. To test it out, run the example scene. | ||
The script itself can be found in the example folder as well. | ||
|
||
## 4. Known Issues (v0.01) | ||
|
||
* Some character voices do not convert to audio files properly, resulting in an FMOD error. The voices concerned are all named after Game of Thrones characters. Please avoid using these voices for the time being. | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters