Frequently Asked Questions (FAQs)

Answers to the most frequently asked questions about the Spatial Creator Toolkit.

General

How do I download the Spatial Creator Toolkit?

The Spatial Creator Toolkit is an SDK that is powered by Unity, so you can use one of the world's most popular game engines and not have to learn another new tool! All you need is Unity, a Spatial account, and the Starter Template!

Follow the steps in Installation to learn how to get started with the Creator Toolkit.

Can I earn money with the Spatial Creator Toolkit?

Yes! Spatial offers creators one of the best revenue share models in the industry. With Spatial Coins, you can sell items like custom avatars, power-ups, avatar attachments, and more in-game digital items in your Spatial games & experiences.

Can I embed my game on another website?

Yes. We provide you the HTML embed code so you can embed any game or space on a desktop webpage using an iframe.

Two important things to note about embedding:

  • Embeds do not run on mobile browsers. Users will be prompted to download Spatial Mobile App instead.
  • Embeds should be 1280x720 or larger Embedding a space on Spatial

Lighting and Rendering

My object isn't receiving lightmapped shadows. How do I fix this?

Ensure you have lighting settings properly configured

Here's all the individual settings you need to get an object to be lightmap-able:

  • You’ll need to mark the object as Static:

Lighting settings

  • The mesh of the object will need a second set of UVs. In the model import setting, you can let Unity generate these UVs for you. “Manual” margin method is usually more space efficient.

Lighting settings

  • The light that is casting baked shadows needs to either be set to “Mixed” or “Baked” mode

Lighting settings

Once you have all of these settings, re-bake your lightmaps.

Why does my scene appear dark?

Make sure you Generate Lighting properly
  • This could happen when you publish your space without LightingData. (This doesn't happen in sandbox.)

Lighting settings

  • Solution: Press the ‘Generate Lighting’ button under Lighting settings.

Lighting settings

Lighting settings

-Here's how to properly generate lighting:

  1. Window -> Rendering -> Lighting to open Lighting window.
  2. Go to Backed Lightmaps tab.
  3. Press ‘Generate Lighting’ button and you’ll see LightingData is generated and assigned to the scene.

Lighting settings

Lighting settings

Lighting settings

There's a seam line in my scene's skybox - how do I remove it?

Disable ‘Generate Mip Maps’ on your texture setting. Read on for more:

Lighting settings

Disable ‘Generate Mip Maps’ on your texture setting. This happens if your skybox(panoramic) texture has mipmaps.

Lighting settings

The terrain in my scene isn't rendered with normal maps on Web or in my Sandbox

Expand to see the solution:

Problem: Terrain has normal maps but Spatial doesn’t render it on Web and Sandbox.

Lighting settings

(Thanks to Shawn Young for reporting this bug and providing screen capture images.)

Solution:

  • Do not use MaskMap in your Terrain Layers.
  • Use 4 or less Terrain layers.

Lighting settings

More info: - WebGL has limited sampler state (16) and some variants of terrain shader use more than it. In this case, Unity fails to compile the variant and uses one of fallbacks. - This compile fail doesn’t always happen. Some combinations between other graphics features like additional lights or lightmap modes generate different variants of terrain shader and some of it use more than 16 sampler state and fails to compile on web build. - So as a generic solution, you can leave the MaskMap slot empty, or you’ll need to test whether the terrain appears okay in your scene. - Also you should use 4 or less Terrain Layers to your Terrain for the same reason. - Check out Unity's documentation for more information

Lighting settings

My lightmaps don't look right. How do I fix them?

Solution: Adjust the texture settings.
  1. Select the lightmap texture and go to WebGL settings in the inspector.

Lighting settings

  1. Choose the RGBA Compressed DXT5|BC3 format under the Format option.

Lighting settings

  1. Click Apply to apply the changes.

Lighting settings

  1. ⚠️ Keep in mind that Crunched DXT has a significantly smaller size (15%) compared to Compressed DXT. In some cases, prioritizing smooth performance may be preferable over preserving every detail.

Lighting settings

  1. 🚫 Avoid using ASTC on WebGL as it is intended for mobile browsers. Unity will convert the textures again during runtime, leading to significant loading times. (Using ASTC is highly recommended for mobile platforms such as Android and iOS.)

Lighting settings

The terrain in my scene looks shiny when uploaded to Spatial.

Solution: Select a texture format that does not contain alpha (DXT1).
  • Go to the platform settings and choose a texture format that does not include an alpha channel (RGB, not RGBA).

Note that the AssetImportSettings will automatically detect the presence of alpha and choose the appropriate format accordingly.

Lighting settings

  • If a texture does not have alpha but is using a format that includes alpha, it will always appear white. And Unity Terrain layer will utilize it for smoothness, resulting in a glossy appearance. (Unity won’t use alpha if the format doesn’t include alpha)

Lighting settings

  • ASTC is the recommended format for mobile devices. However, as ASTC contains alpha, it can still result in the same issue. As an alternative, you can choose DXT1. Please note that selecting DXT1 will lead to a larger file size compared to ASTC. If you have experience with texture processing, you can manually add a smoothness value to the alpha channel of the texture. Alternatively, you can utilize this utility to help you achieve the desired outcome.

Particles don't appear as expected

Try adjusting the texture setting, otherwise let us know by posting in Discord
  • Try adjusting the texture settings by using formats with alpha (DXT5) or without alpha (DXT1) to see if it resolves the issue.
  • If that doesn't work, please post your issue in the Creator Toolkit forums on the Spatial Discord server.

Scripts that read textures or meshes no longer function properly

Enable the Read/Write option in the settings.
  • Select the texture or model in the project and enable the Read/Write option.

Lighting settings

⚠️ Note that enabling Read/Write will result in a doubling of the memory size.

Custom TextMeshPro fonts are not appearing

Don't mix fonts used in the UI with fonts used in world space.
  • Unity doesn't like it when you combine the same font material between TMPro UGUI and TMPro fonts.
  • Best way to prevent this is to duplicate the font material and name them appropriately (eg. NotoSans-UI and NotoSans-World)
  • Go through all uses of your font and assign the appropriate font material in the dropdown selector.