Inworld Editor
The editor files are located in Assets > Inworld > Inworld.Editor
. They are mainly used to implement the Inworld Studio Panel
which is displayed below.
Editor states
The Inworld Studio Panel
is implemented by a finite-state machine. Each page has its own state, and it is initialized and implemented as shown below.
Developers can manually set the state by right clicking on Project panel, and select Inworld > Editor Settings
.
1. Initialization
This is the page where developers must input their Studio Access Token. After logging in, we will fetch your user data and generate a new InworldUserSetting
if it does not already exist.
All of the user's related data, including workspace, scene, API key, character model, thumbnail, prefabs, and more, will be stored under that Scriptable Object.
2. Select Game Data
On this page, developers can select which workspace and Inworld Scene
they would like to import. If there is only one entry for each drop-down field, for example, if the user has only one workspace, one API key/secret, or one Inworld Scene
, we will automatically select it for you.
In your current Unity scene, we will generate an InworldController
if it does not already exist.
Once you choose this data and click Next
, the system will generate an instance of the InworldGameData
Scriptable Object for the selected Inworld Scene
and place that in your user data folder.
In your current Unity scene, the InworldController
will set the related InworldGameData
.
3. Select Character
This state is triggered when a workspace, API key and secret, and scene have been selected. In this state, it will start fetching thumbnails, avatars, and generating character buttons.
Then you can select one of your Inworld Characters and drag the respective prefab into a Unity scene, and test all the results.
4. Error
An error page is triggered if the default resource is incorrect or if the token can not be received. You can click Back
to return to the previous working status, or you can select the Init status in the Inworld > Editor Settings
.
Please visit InworldEditor for more references.