In this article, I introduce how to reduce the file size of an asset in case it is too large to upload to STYLY.
Check the size of an asset
The recommended size is less than 20MB to upload to STYLY. ※As of September 2018.
You will see an error as shown below if you try to upload to STYLY an asset with the file size over this limit.
Firstly check the size of the Prefab to upload when the error shown above popped up.
Right-click the Prefab and select STYLY > “Check File Size”.
It’s 16MB. Now let’s reduce it.
Reduce the size of the asset
In a 3D object, textures occupy most of the file size.
To reduce the file size, it is effective to make each texture coarse.
Find “Texture” folder in the Project window.
Once you expand the Texture folder, the list of the textures used in the project will be displayed.
We identify the textures that are used in the corresponding object.
As you click each file in the Hierarchy window, the corresponding texture is displayed as shown below (The area surrounded by the red box on the right).
It is the texture used in the object.
As the corresponding texture turned out “Snowman_Albedo_01(A Smoothness)”, we now make it coarse.
Select the texture, “Snowman_Albedo_01(A Smoothness)”, in the Project window.
Then, the information of the texture is shown in the Inspector window.
“Max size” has been set to 2048 in the Default section.
Click the number to open the list of sizes. Select “256” and press the “APPLY” button on the bottom-right.
This operation reduces the size of the texture.
Copy the mesh and texture to the Scene
Next, paste the mesh, which is the shape of the object, and the texture reduced in size above.
Find where the mesh of the corresponding object is.
As you find the file with the corresponding texture, you can find the mesh of the corresponding object, at the “Mesh” box in the Inspector window.
Select the “Snowman_LOD0” mesh and then the mesh is highlighted in the Project window as shown below.
Drag and drop the highlighted mesh to the Scene.
Add “Snowman_LOD1” and “Snowman_LOD2” to the Scene in the same way.
To avoid confusion, delete the original object.
In the Hierarchy window, delete the files that form the original object.
Next, assign the texture to the meshes added.
There are three meshes（It’s hard to see in the image below but you realize three meshes in the Hierarchy window). As they take the same texture, “Snowman_Albedo_01(A Smoothness)”, drag and drop it to all three meshes.
The texture reduced in size has been assigned to the meshes.
Check the size and upload to STYLY
Put the objects with the coarse texture together.
Create a new Game Object by “Create Empty” in the Hierarchy window and store the objects with the coarse texture in it.
Drag and drop the object to the Project window to translate them into a Prefab. Right-click the Prefab created and select STYLY > Check File Size to check the size.
It ‘s 5MB now.
The data reduction is successful as it was 16MB!
All you have to do is to upload to STYLY.
That is all you need to slim down an asset with large file size by making its textures coarse and upload it to STYLY.