FAQ
FAQ
Q: Do I need to manually create the TudadaSDKHandler GameObject?
No. It is automatically created when you first access TudadaSDK.Instance. You do not need to create it manually, and do not rename it.
Q: Can I test in the Unity Editor?
Yes. All APIs work as mocks in the Editor. Storage uses PlayerPrefs, and ads simulate instant success/completion.
Q: What is the difference between Storage and TudadaStore?
- Storage (SetStorage/GetStorage): Saved locally on the device. Data is lost when the app is deleted. Max 10MB.
- TudadaStore (TudadaStoreSave/TudadaStoreGet): Saved to the cloud. Data persists even when switching devices. Max 2KB per value.
It is recommended to save important data such as game progress in TudadaStore, and settings or cache data in Storage.
Q: What is the difference when isEnded is true vs false for ads?
If isEnded in the onClose event is true, the user watched the ad to completion, so you should grant the reward. If false, the user closed it early.
Q: C# API calls don't work after the WebGL build
Make sure the TudadaSDK.jslib plugin file is located at the Assets/Plugins/WebGL/ path. This file is compiled and included in the build output during Unity WebGL builds, and is required for calling JavaScript functions from C#. It is automatically placed in the correct location when installed via .unitypackage, but if you moved the file after import, you need to move it back to its original location.
Q: Do I need to modify index.html every time I build with Unity?
Yes, Unity WebGL builds regenerate index.html each time. You need to reapply the modifications from WebGL Build Setup after every build.
To automate this, you can customize a Unity WebGL Template:
- Create an
Assets/WebGLTemplates/TudadaTemplate/folder - Place the modified
index.htmlin that folder (keeping Unity's{{{ }}}template syntax) - In Project Settings > Player > WebGL > Resolution and Presentation > WebGL Template, select
TudadaTemplate
This way, builds will automatically generate HTML with the SDK included.
Q: Does the SDK work with compressed (Gzip) builds?
Yes. The SDK is independent of Unity build files, so it works the same regardless of Gzip compression. The index.html modification method is also the same. However, Brotli compression is not supported, so set the Compression Format to Gzip or Disabled in Unity Build Settings.