Hello,
We have an issue with preloading the asset tables. The assets are audio files and materials. Weirdly we do not seem to get an error for all assets but for some amount only. The errors look like this:
Error Logs in console
Also when preloading is set off and we try to localize a material, we get the last 6 errors (above image). 6 with the same ID because we have 6 localization components. The custom component looks like this:
Inspector Component
and the code for it looks like this
LocalizeMaterialEvent.cs
public class LocalizeMaterialEvent : LocalizedAssetEvent<Material, LocalizedMaterial, UnityEventMaterial>
{
[SerializeField] private MeshRenderer _renderer;
[SerializeField] private int _materialIndex;
private void Awake()
{
if (_renderer != null)
{
OnUpdateAsset.AddListener(SetMaterial);
}
}
private void SetMaterial(Material material)
{
if (_renderer.materials.Length <= _materialIndex) return;
var materials = _renderer.materials;
materials[_materialIndex] = material;
_renderer.materials = materials;
}
public void SetLocalizedMaterial(LocalizedMaterialAsset localizedMaterialAsset)
{
AssetReference = localizedMaterialAsset.LocalizedMaterial;
}
}
Note, that we are using our own implementation of LocalizedMaterial (
code
[Serializable]
public class LocalizedMaterial : LocalizedAsset<Material>
{
}
). We implemented this just before 0.11.0 where you introduced your own.
Also, note that this is only an issue if the Play Mode Script is set to “Use Existing Build”. It is not an issue if set to “Use Asset Database”.
Unity: 2019.4.14f1
Chosen platform: Android
Addressables: 1.17.15
Localization: 0.11.0-preview


