diff --git a/sdkproject/Assets/ApiTest.cs b/sdkproject/Assets/ApiTest.cs index b9160d498..effcdf3e6 100644 --- a/sdkproject/Assets/ApiTest.cs +++ b/sdkproject/Assets/ApiTest.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using Mapbox.Unity.Map; using Mapbox.Unity.MeshGeneration.Interfaces; +using Mapbox.Unity.MeshGeneration.Filters; using UnityEngine; public class ApiTest : MonoBehaviour @@ -11,8 +12,17 @@ public class ApiTest : MonoBehaviour public ImagerySourceType imagerySource = ImagerySourceType.MapboxStreets; public LocationPrefabCategories LocationPrefabCategories; + public LayerFilterOperationType layerFilterOperationType; public GameObject PoiPrefab; + + public LayerFilterCombinerOperationType layerFilterCombinerOperationType; + public string filterKey; + + public float min; + public float max; + public string contains; + readonly StyleTypes[] testStyles = new StyleTypes[3] { StyleTypes.Fantasy, StyleTypes.Realistic, StyleTypes.Simple }; int styleId = -1; void Start() @@ -113,7 +123,7 @@ public void ChangeBuildingMaterial() var layer = _abstractMap.VectorData.LayerProperty.FindFeatureLayerWithName("ExtrudedBuildings"); if (layer != null) { - layer.SetTexturingType(testStyles[styleId]); + layer.SetStyleType(testStyles[styleId]); } else { @@ -175,7 +185,6 @@ public void ChangePoiCategory() { var pois = _abstractMap.VectorData.LayerProperty.FindPoiLayerWithName("loc"); pois.categories = LocationPrefabCategories; - Debug.Log("ChangePoiCategory ---> " + pois.GetType().ToString()); //PrefabItemOptions pois.HasChanged = true; } @@ -184,7 +193,6 @@ public void ChangePoiPrefab() { var pois = _abstractMap.VectorData.LayerProperty.FindPoiLayerWithName("loc"); pois.spawnPrefabOptions.prefab = PoiPrefab; - Debug.Log("ChangePoiPrefab ---> " + pois.spawnPrefabOptions.GetType().ToString());//SpawnPrefabOptions pois.spawnPrefabOptions.HasChanged = true; } @@ -194,7 +202,6 @@ public void ChangeToPoiByName() var pois = _abstractMap.VectorData.LayerProperty.FindPoiLayerWithName("loc"); pois.findByType = LocationPrefabFindBy.POIName; pois.nameString = "yerba"; - Debug.Log("ChangeToPoiByName ---> " + pois.GetType().ToString());//PrefabItemOptions pois.HasChanged = true; } @@ -203,10 +210,101 @@ public void ChangeToCategory() { var pois = _abstractMap.VectorData.LayerProperty.FindPoiLayerWithName("loc"); pois.findByType = LocationPrefabFindBy.MapboxCategory; - Debug.Log("ChangeToCategory ---> " + pois.GetType().ToString());//PrefabItemOptions pois.HasChanged = true; } + [ContextMenu("Vector - Add New Filter")] + public void AddNewFilter() + { + var vectorLayer = _abstractMap.VectorData.LayerProperty.FindFeatureLayerWithName("loc"); + LayerFilter layerFilter = new LayerFilter(LayerFilterOperationType.Contains); + vectorLayer.filterOptions.filters.Add(layerFilter); + vectorLayer.filterOptions.HasChanged = true; + } + + [ContextMenu("Vector - Remove Filter")] + public void RemoveFilter() + { + int index = 0; + var vectorLayer = _abstractMap.VectorData.LayerProperty.FindFeatureLayerWithName("loc"); + if(index < vectorLayer.filterOptions.filters.Count) + { + vectorLayer.filterOptions.filters.RemoveAt(index); + } + vectorLayer.filterOptions.HasChanged = true; + } + + [ContextMenu("Vector - Set Filter Combiner Type")] + public void SetFilterCombinerType() + { + var vectorLayer = _abstractMap.VectorData.LayerProperty.FindFeatureLayerWithName("loc"); + + vectorLayer.filterOptions.combinerType = layerFilterCombinerOperationType; + + vectorLayer.filterOptions.HasChanged = true; + } + + [ContextMenu("Vector - Set Filter Key")] + public void SetFilterKey() + { + int index = 0; + var vectorLayer = _abstractMap.VectorData.LayerProperty.FindFeatureLayerWithName("loc"); + if (index < vectorLayer.filterOptions.filters.Count) + { + vectorLayer.filterOptions.filters[index].Key = filterKey; + } + vectorLayer.filterOptions.HasChanged = true; + } + + [ContextMenu("Vector - Set Filter Operator")] + public void SetFilterOperator() + { + int index = 0; + var vectorLayer = _abstractMap.VectorData.LayerProperty.FindFeatureLayerWithName("loc"); + if (index < vectorLayer.filterOptions.filters.Count) + { + vectorLayer.filterOptions.filters[index].filterOperator = layerFilterOperationType; + } + vectorLayer.filterOptions.HasChanged = true; + } + + [ContextMenu("Vector - Set Filter Min Value")] + public void SetFilterCompareValue() + { + int index = 0; + var vectorLayer = _abstractMap.VectorData.LayerProperty.FindFeatureLayerWithName("loc"); + if (index < vectorLayer.filterOptions.filters.Count) + { + vectorLayer.filterOptions.filters[index].Min = min; + } + vectorLayer.filterOptions.HasChanged = true; + } + + [ContextMenu("Vector - Set Filter Compare MinMaxValue")] + public void SetFilterCompareMinMaxValue() + { + int index = 0; + var vectorLayer = _abstractMap.VectorData.LayerProperty.FindFeatureLayerWithName("loc"); + if (index < vectorLayer.filterOptions.filters.Count) + { + vectorLayer.filterOptions.filters[index].Min = min; + vectorLayer.filterOptions.filters[index].Max = max; + } + vectorLayer.filterOptions.HasChanged = true; + } + + [ContextMenu("Vector - Set Filter Contains Value")] + public void SetFilterContainsValue() + { + int index = 0; + var vectorLayer = _abstractMap.VectorData.LayerProperty.FindFeatureLayerWithName("loc"); + if (index < vectorLayer.filterOptions.filters.Count) + { + vectorLayer.filterOptions.filters[index].PropertyValue = contains; + } + vectorLayer.filterOptions.HasChanged = true; + } + [ContextMenu("TestPoiCategoryApi")] public void TestPoiCategoryApi() { diff --git a/sdkproject/Assets/Mapbox/Unity/DataContainers/GeometryMaterialOptions.cs b/sdkproject/Assets/Mapbox/Unity/DataContainers/GeometryMaterialOptions.cs index 9e9b339c6..897c5ff1f 100644 --- a/sdkproject/Assets/Mapbox/Unity/DataContainers/GeometryMaterialOptions.cs +++ b/sdkproject/Assets/Mapbox/Unity/DataContainers/GeometryMaterialOptions.cs @@ -7,8 +7,17 @@ using Mapbox.Unity.MeshGeneration.Modifiers; using Mapbox.Unity.MeshGeneration.Data; + public class CustomStyleBundle + { + public Material topMaterial; + public Material sideMaterial; + public AtlasInfo atlasInfo; + public ScriptablePalette colorPalette; + } + [Serializable] - public class GeometryMaterialOptions : ModifierProperties + public class GeometryMaterialOptions : ModifierProperties, ISubLayerTexturing + { public override Type ModifierType { @@ -128,6 +137,11 @@ public void SetDefaultAssets() texturingType = UvMapType.Atlas; AssignAssets(styleAssetPathBundle); } + + public void SetDefaultStyleType(StyleTypes style) + { + throw new NotImplementedException(); + } } [Serializable] diff --git a/sdkproject/Assets/Mapbox/Unity/LayerProperties/VectorSubLayerProperties.cs b/sdkproject/Assets/Mapbox/Unity/LayerProperties/VectorSubLayerProperties.cs index 9fc73d10d..12a3f0af9 100644 --- a/sdkproject/Assets/Mapbox/Unity/LayerProperties/VectorSubLayerProperties.cs +++ b/sdkproject/Assets/Mapbox/Unity/LayerProperties/VectorSubLayerProperties.cs @@ -3,11 +3,12 @@ using System; using System.Collections.Generic; using Mapbox.Unity.MeshGeneration.Modifiers; + using Mapbox.Unity.MeshGeneration.Data; using Mapbox.Unity.Utilities; using UnityEngine; [Serializable] - public class VectorSubLayerProperties : LayerProperties + public class VectorSubLayerProperties : LayerProperties, IVectorSubLayer { public virtual string Key { @@ -16,6 +17,45 @@ public virtual string Key return coreOptions.layerName; } } + + public ISubLayerTexturing Texturing + { + get + { + return materialOptions; + } + } + public ISubLayerModeling Modeling + { + get + { + if (modeling == null) + { + modeling = new SubLayerModeling(this); + } + return modeling; + } + } + public ISubLayerFiltering Filtering + { + get + { + return filterOptions; + } + } + public ISubLayerBehaviorModifiers BehaviorModifiers + { + get + { + if (behaviorModifiers == null) + { + behaviorModifiers = new SubLayerBehaviorModifiers(this); + } + return behaviorModifiers; + } + } + protected SubLayerModeling modeling; + protected SubLayerBehaviorModifiers behaviorModifiers; public CoreVectorLayerProperties coreOptions = new CoreVectorLayerProperties(); public LineGeometryOptions lineGeometryOptions = new LineGeometryOptions(); public VectorFilterOptions filterOptions = new VectorFilterOptions(); @@ -47,36 +87,289 @@ public virtual string Key public List GoModifiers; public PresetFeatureType presetFeatureType = PresetFeatureType.Custom; - //public string roadLayer = "road"; - //public string landuseLayer = "landuse"; - //public string roadLayer_TypeProperty = "class"; - //public string landuseLayer_TypeProperty = "class"; - [SerializeField] private int _maskValue; public string selectedTypes; - public bool SubLayerNameMatchesExact(string layerName) + /// + /// Returns true if the layer name matches a given string. + /// + /// true, if layer name matches exact was subed, false otherwise. + /// Layer name. + public virtual bool SubLayerNameMatchesExact(string layerName) { return coreOptions.sublayerName == layerName; } - public bool SubLayerNameContains(string layerName) + /// + /// Returns true if the layer name contains a given string. + /// + /// true, if layer name contains was subed, false otherwise. + /// Layer name. + public virtual bool SubLayerNameContains(string layerName) { return coreOptions.sublayerName.Contains(layerName); } + /// + /// Returns true if the layer uses a given style. + /// + /// true, if layer uses style type was subed, false otherwise. + /// Style. + public virtual bool SubLayerUsesStyleType(StyleTypes style) + { + return materialOptions.style == style; + } + + #region Setters - public void SetActive(bool active) + /// + /// Sets the active. + /// + /// If set to true active. + public virtual void SetActive(bool active) { coreOptions.isActive = active; coreOptions.HasChanged = true; } - public void SetTexturingType(StyleTypes style) + /// + /// Sets the type of the style. + /// + /// Style. + public virtual void SetStyleType(StyleTypes style) { materialOptions.style = style; materialOptions.HasChanged = true; } - } + /// + /// Sets the layer to use the realistic style. + /// + public virtual void SetRealisticStyle() + { + materialOptions.style = StyleTypes.Realistic; + materialOptions.HasChanged = true; + } + + /// + /// Sets the layer to use the fantasy style. + /// + public virtual void SetFantasyStyle() + { + materialOptions.style = StyleTypes.Fantasy; + materialOptions.HasChanged = true; + } + + /// + /// Sets the type of the simple style palette. + /// + /// Palette. + public virtual void SetSimpleStylePaletteType(SamplePalettes palette) + { + materialOptions.samplePalettes = palette; + materialOptions.HasChanged = true; + } + + /// + /// Sets the light style opacity. + /// + /// Opacity. + public virtual void SetLightStyleOpacity(float opacity) + { + materialOptions.lightStyleOpacity = Mathf.Clamp(opacity, 0.0f, 1.0f); + materialOptions.HasChanged = true; + } + + /// + /// Sets the dark style opacity. + /// + /// Opacity. + public virtual void SetDarkStyleOpacity(float opacity) + { + materialOptions.darkStyleOpacity = Mathf.Clamp(opacity, 0.0f, 1.0f); + materialOptions.HasChanged = true; + } + + /// + /// Sets the color of the color style. + /// + /// Color. + public virtual void SetColorStyleColor(Color color) + { + materialOptions.colorStyleColor = color; + materialOptions.HasChanged = true; + } + + /// + /// Sets the texturing (UV) type of the custom style. + /// + /// Uv map type. + public virtual void SetCustomTexturingType(UvMapType uvMapType) + { + materialOptions.texturingType = uvMapType; + materialOptions.HasChanged = true; + } + + /// + /// Sets the custom style top material. + /// + /// Material. + public virtual void SetCustomTopMaterial(Material material) + { + materialOptions.materials[0].Materials[0] = material; + materialOptions.HasChanged = true; + } + + /// + /// Sets the custom style side material. + /// + /// Material. + public virtual void SetCustomSideMaterial(Material material) + { + materialOptions.materials[1].Materials[0] = material; + materialOptions.HasChanged = true; + } + + /// + /// Sets the custom style top and side materials. + /// + /// Top material. + /// Side material. + public virtual void SetCustomMaterials(Material topMaterial, Material sideMaterial) + { + materialOptions.materials[0].Materials[0] = topMaterial; + materialOptions.materials[1].Materials[0] = sideMaterial; + materialOptions.HasChanged = true; + } + + /// + /// Sets the custom style uv atlas. + /// + /// Atlas. + public virtual void SetCustomUvAtlas(AtlasInfo atlas) + { + materialOptions.atlasInfo = atlas; + materialOptions.HasChanged = true; + } + + /// + /// Sets the custom style color palette. + /// + /// Palette. + public virtual void SetCustomColorPalette(ScriptablePalette palette) + { + materialOptions.colorPalette = palette; + materialOptions.HasChanged = true; + } + + /// + /// Sets the custom style assets using a CustomStyleBundle object. + /// + /// Custom style bundle. + public virtual void SetCustomStyleAssets(CustomStyleBundle customStyleBundle) + { + materialOptions.materials[0].Materials[0] = (customStyleBundle.sideMaterial != null) ? customStyleBundle.sideMaterial : materialOptions.materials[0].Materials[0]; + materialOptions.materials[1].Materials[0] = (customStyleBundle.topMaterial != null) ? customStyleBundle.topMaterial : materialOptions.materials[1].Materials[0]; + materialOptions.atlasInfo = (customStyleBundle.atlasInfo != null) ? customStyleBundle.atlasInfo : materialOptions.atlasInfo; + materialOptions.colorPalette = (customStyleBundle.colorPalette != null) ? customStyleBundle.colorPalette : materialOptions.colorPalette; + materialOptions.HasChanged = true; + } + + #endregion + + #region Getters + + /// + /// Gets the type of style used in the layer. + /// + /// The style type. + public virtual StyleTypes GetStyleType() + { + return materialOptions.style; + } + + /// + /// Gets the type of simple style palette used in the layer. + /// + /// The simple style palette type. + public virtual SamplePalettes GetSimpleStylePaletteType() + { + return materialOptions.samplePalettes; + } + + /// + /// Gets the light style opacity. + /// + /// The light style opacity. + public virtual float GetLightStyleOpacity() + { + return materialOptions.lightStyleOpacity; + } + + /// + /// Gets the dark style opacity. + /// + /// The dark style opacity. + public virtual float GetDarkStyleOpacity() + { + return materialOptions.darkStyleOpacity; + } + + /// + /// Gets the color of the color style. + /// + /// The color style color. + public virtual Color GetColorStyleColor() + { + return materialOptions.colorStyleColor; + } + + /// + /// Gets the type of the custom style texturing. + /// + /// The custom texturing type. + public virtual UvMapType GetTexturingType() + { + return materialOptions.texturingType; + } + + /// + /// Gets the custom top material. + /// + /// The custom top material. + public virtual Material GetTopMaterial() + { + return materialOptions.materials[0].Materials[0]; + } + + /// + /// Gets the custom side material. + /// + /// The custom side material. + public virtual Material GetSideMaterial() + { + return materialOptions.materials[1].Materials[0]; + } + + /// + /// Gets the custom uv atlas. + /// + /// The custom uv atlas. + public virtual AtlasInfo GetUvAtlas() + { + return materialOptions.atlasInfo; + } + + /// + /// Gets the custom color palette. + /// + /// The custom color palette. + public virtual ScriptablePalette GetColorPalette() + { + return materialOptions.colorPalette; + } + + #endregion + + } } diff --git a/sdkproject/Assets/Mapbox/Unity/SourceLayers/ILayer.cs b/sdkproject/Assets/Mapbox/Unity/SourceLayers/ILayer.cs index e53619b6c..ed3aba979 100644 --- a/sdkproject/Assets/Mapbox/Unity/SourceLayers/ILayer.cs +++ b/sdkproject/Assets/Mapbox/Unity/SourceLayers/ILayer.cs @@ -33,4 +33,81 @@ public interface IVectorDataLayer : ILayer { } + + + // TODO: Move interfaces into individual files. + public interface ISubLayerCoreOptions + { + } + public interface ISubLayerExtrusionOptions + { + } + + public interface ISubLayerLineGeometryOptions + { + + } + + public interface ISubLayerPolygonGeometryOptions + { + + } + + public interface ISubLayerFiltering + { + + } + + public interface ISubLayerModeling : + ISubLayerCoreOptions, + ISubLayerExtrusionOptions, + ISubLayerLineGeometryOptions, + ISubLayerPolygonGeometryOptions + { + + } + + public interface ISubLayerTexturing + { + + } + + public interface ISubLayerBehaviorModifiers + { + + } + + public interface IVectorSubLayer + { + ISubLayerFiltering Filtering { get; } + ISubLayerModeling Modeling { get; } + ISubLayerTexturing Texturing { get; } + ISubLayerBehaviorModifiers BehaviorModifiers { get; } + + // Add methods that we need at sublayer level + } + + + // TODO Move classes into individual files. + public class SubLayerModeling : ISubLayerModeling + { + VectorSubLayerProperties _subLayerProperties; + public SubLayerModeling(VectorSubLayerProperties subLayerProperties) + { + _subLayerProperties = subLayerProperties; + } + } + + public class SubLayerBehaviorModifiers : ISubLayerBehaviorModifiers + { + // TODO: Remove if not required. + VectorSubLayerProperties _subLayerProperties; + public SubLayerBehaviorModifiers(VectorSubLayerProperties subLayerProperties) + { + _subLayerProperties = subLayerProperties; + } + } + } + + diff --git a/sdkproject/Assets/VectorTextureApiTest.cs b/sdkproject/Assets/VectorTextureApiTest.cs new file mode 100644 index 000000000..8b3b551b9 --- /dev/null +++ b/sdkproject/Assets/VectorTextureApiTest.cs @@ -0,0 +1,167 @@ +//using System; +using System.Collections; +using System.Collections.Generic; +using Mapbox.Unity.Map; +using Mapbox.Unity.MeshGeneration.Interfaces; +using Mapbox.Unity.MeshGeneration.Filters; +using UnityEngine; +using UnityEngine.Assertions; +using System.Reflection; + +public class VectorTextureApiTest : MonoBehaviour +{ + private AbstractMap _abstractMap; + + private VectorSubLayerProperties _layer; + + List testMethods; + List testResults = new List(); + private bool _testStarted; + + void Start() + { + _abstractMap = FindObjectOfType(); + _layer = _abstractMap.VectorData.LayerProperty.FindFeatureLayerWithName("test"); + Assert.IsNotNull(_layer, "No layer named test found"); + + testMethods = new List + { + SetStyle, + SetRealisticStyleType, + SetFantasyStyleType, + SetSimpleStylePaletteType, + SetLightStyleOpacity, + SetDarkStyleOpacity, + SetColorStyleColor, + SetCustomTexturingType, + SetCustomTopMaterial, + SetCustomSideMaterial, + SetCustomMaterials + }; + } + + private void ConductTests() + { + for (int i = 0; i < testMethods.Count; i++) + { + testMethods[i](); + } + PrintResults(); + } + + private void Update() + { + if(_testStarted) + { + return; + } + if (Input.GetKeyDown(KeyCode.Space)) + { + ConductTests(); + _testStarted = true; + } + } + + private void AddResultsToList(MethodBase methodBase, bool result) + { + string color = (result) ? "cyan" : "red"; + string printStatement = string.Format("{1} -> {2}", color, result, methodBase.Name); + testResults.Add(printStatement); + } + + private void PrintResults() + { + Debug.Log("Vector Texture API Test ///////////////////////////////////////////////////"); + for (int i = 0; i < testResults.Count; i++) + { + Debug.Log(testResults[i]); + } + } + + void SetStyle() + { + foreach (StyleTypes style in System.Enum.GetValues(typeof(StyleTypes))) + { + _layer.SetStyleType(style); + AddResultsToList(MethodBase.GetCurrentMethod(), _layer.GetStyleType() == style); + } + } + + void SetRealisticStyleType() + { + _layer.SetRealisticStyle(); + AddResultsToList(MethodBase.GetCurrentMethod(), _layer.GetStyleType() == StyleTypes.Realistic); + } + + void SetFantasyStyleType() + { + _layer.SetFantasyStyle(); + AddResultsToList(MethodBase.GetCurrentMethod(), _layer.GetStyleType() == StyleTypes.Fantasy); + } + + void SetSimpleStylePaletteType() + { + foreach (SamplePalettes palette in System.Enum.GetValues(typeof(SamplePalettes))) + { + _layer.SetSimpleStylePaletteType(palette); + AddResultsToList(MethodBase.GetCurrentMethod(), _layer.GetSimpleStylePaletteType() == palette); + } + } + + void SetLightStyleOpacity() + { + float randomVal = UnityEngine.Random.value; + _layer.SetLightStyleOpacity(randomVal); + AddResultsToList(MethodBase.GetCurrentMethod(), Mathf.Approximately(_layer.GetLightStyleOpacity(), randomVal)); + } + + void SetDarkStyleOpacity() + { + float randomVal = UnityEngine.Random.value; + _layer.SetDarkStyleOpacity(randomVal); + AddResultsToList(MethodBase.GetCurrentMethod(), Mathf.Approximately(_layer.GetDarkStyleOpacity(), randomVal)); + } + + void SetColorStyleColor() + { + Color randomColor = new Color(Random.value, Random.value, Random.value, Random.value); + _layer.SetColorStyleColor(randomColor); + AddResultsToList(MethodBase.GetCurrentMethod(), _layer.GetColorStyleColor() == randomColor); + } + + void SetCustomTexturingType() + { + _layer.SetStyleType(StyleTypes.Custom); + foreach (UvMapType uv in System.Enum.GetValues(typeof(UvMapType))) + { + _layer.SetCustomTexturingType(uv); + AddResultsToList(MethodBase.GetCurrentMethod(), _layer.GetTexturingType() == uv); + } + } + + void SetCustomTopMaterial() + { + _layer.SetStyleType(StyleTypes.Custom); + Material myNewMaterial = new Material(Shader.Find("Specular")); + _layer.SetCustomTopMaterial(myNewMaterial); + AddResultsToList(MethodBase.GetCurrentMethod(), _layer.GetTopMaterial().name == myNewMaterial.name); + } + + void SetCustomSideMaterial() + { + _layer.SetStyleType(StyleTypes.Custom); + Material myNewMaterial = new Material(Shader.Find("Specular")); + _layer.SetCustomSideMaterial(myNewMaterial); + AddResultsToList(MethodBase.GetCurrentMethod(), _layer.GetSideMaterial().name == myNewMaterial.name); + } + + void SetCustomMaterials() + { + _layer.SetStyleType(StyleTypes.Custom); + Material myNewMaterialTop = new Material(Shader.Find("Specular")); + Material myNewMaterialSide = new Material(Shader.Find("Specular")); + _layer.SetCustomMaterials(myNewMaterialTop, myNewMaterialSide); + AddResultsToList(MethodBase.GetCurrentMethod(), _layer.GetTopMaterial().name == myNewMaterialTop.name); + AddResultsToList(MethodBase.GetCurrentMethod(), _layer.GetSideMaterial().name == myNewMaterialSide.name); + } +} \ No newline at end of file diff --git a/sdkproject/Assets/VectorTextureApiTest.cs.meta b/sdkproject/Assets/VectorTextureApiTest.cs.meta new file mode 100644 index 000000000..798d53596 --- /dev/null +++ b/sdkproject/Assets/VectorTextureApiTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 83471408389e14ce59814e5b9de2c90d +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: