Studio GuideWorld SDK Guide
Log In

Unity and Exporting to ZEPETO Studio

Setup

Ensure you have the required Unity files from the 3D Item Creation - Getting Started Section. We recommend using Unity Hub as a project/Unity management system.


Unity Tour

First, we need to open Unity. Launch Unity Hub and open the ZEPETO Studio Project folder using the open button. Remember that the Unity project is contained within a set of folders rather than a file.
With the Unity Project open: A quick tour of the default layout. In the middle is the 3D scene view. This is where a lot of the editing takes place. In the toolbar on the left is the hierarchy. This hierarchy contains a list of all of the content in the scene. Below that is the project toolbar. The project toolbar contains all of the files inside of the Unity project. Files are often imported to this location. On the right is the inspector, where the properties of the selected Unity objects are displayed. This panel becomes of most use when testing and tweaking items. Above the scene view, there is a tab that says “Game.” This is a tab for the Game View panel, which displays the perspective of the camera in the Unity scene. When testing items in Unity’s runtime mode, this is where a full front view of the dummy is found, as well as additional buttons for body shape types.

1800

Unity‘s method of navigating the viewport is mostly similar to Blender, with a few differences. Alt + Left click orbits the camera. Middle mouse click pans the view and the scroll wheel will zoom the camera. To zoom without the scroll wheel, Alt + Right click is used. To focus on a selected object, use the ‘F’ key to “focus.”


Item Setup

Importing

Create a folder for your item in the Assets folder. Add the FBX file for your item and the PNG texture file associated with that file into this new folder. You can drag and drop the files into the folder in Unity.

879

To get a PNG texture file on your item, it must be assigned to a Unity material. Create a new material in the folder with the plus button in the upper left corner of the Projects window, or use the right click context menu to go to Create > Material.

762

For organization and clarity, name this material to correspond with the name of your item. This material needs to have its shader model changed from the Unity Standard shader to one of the ZEPETO shaders. This is done through the shader dropdown menu in the inspector, underneath the material name. For most items, the ZEPETO Standard shader is recommended.

975

🚧

Shaders that are not provided by ZEPETO through the ZEPETO shader tab or the Custom Shader add-in are not officially supported and may not work in the app.

With the material created and the shader assigned, add the texture file to the appropriate slots in the material. The standard material has texture slots for color and for normal data.

1048

Material Application

Assign the material to the item by selecting the item fbx file and navigating to the “Material” tab in the inspector.

1012

Drag and drop the Unity material into the item’s material slot. Do not change the mask’s lambert material. Hit the apply button, and the fbx thumbnail should update to preview the item with the new material.

1070

Convert to ZEPETO Style

With importing and setting materials complete, the item must be converted to a ZEPETO style prefab. A prefab is Unity’s template file and is used to store relevant data about the prefab object. To convert your item, select the fbx file and right click. In the right-click menu, go to ZEPETO Studio > Convert to Zepeto Style. Unity will take a moment to convert the fbx file.

732

If a prefab file isn’t created, there may have been an error in the fbx file contents. Check for a console message at the bottom left corner of the unity screen or in the console. A new model object may appear in the scene in certain errors.
Common problems that trigger this error may be:

  • Mask object wasn’t unbound from the armature
  • Mask object had a material attached to it
  • Item is also named “mask”

To solve any of the above issues, make changes in Blender, re-export the fbx file, and re-import in Unity.


Testing the Item

It is good to test the item in Unity before attempting to export and upload to ZEPETO studio. This is done in the playground scene provided in ZEPETO Studio Unity project. Find and open the playground Unity scene. With the scene loaded, enter play mode by clicking the play button at the top of the Unity editor window. The game panel will update and move to the foreground, and a default avatar will appear. The buttons on the right of the play window are used to change between a small set of default body deformation types.

1800

To test an item, it will have to be attached to the avatar. To do this, first select the LOADER component. At the bottom part of the inspector panel of the LOADER component, there is a list of item types. Find the item category that corresponds with the item type of the item to be tested and check the checkbox to activate the category. Then, drag and drop the test item into that slot. The item will be attached to the avatar.


With the item loaded, check the item and avatar for errors. For a better perspective of the avatar, switch to the editor tab. The editor tab allows for more freeform movement of the camera so that all angles can be checked for errors. Masking errors and normals errors can be one of the quickest to spot, as gaps will appear in the mesh or base avatar. In the hierarchy, it’s also possible to access the avatar’s skeleton to test a few bends and poses in Unity. It’s useful to make sure that weight painting was applied and transferred properly.


Exporting to .zepeto

When testing is complete, the item can be packed into a file and exported as a .zepeto file. The .zepeto file is the file that contains all the data about the item and is what gets uploaded to ZEPETO Studio. The conversion process cannot occur while Unity is in play mode and will deliver an error if conversion is attempted in play mode.
To convert the item, first select the ZEPETO style prefab file in the project folder. Then right click on the file and navigate to ZEPETO Studio > Export as .zepeto.

814

Unity may ask to save changes. If changes are not saved, manually discarding scene data may be necessary to proceed. The conversion process may take several minutes for it to complete!
When the conversion process is complete, a new file will appear. It will have the same name as the ZEPETO Style prefab, but with the .zepeto file extension. This file can now be uploaded to ZEPETO Studio!