public void WillCreateModeled(WillCreateModeledStructureArgs args) { Google.Maps.Feature.Style.ModeledStructureStyle.Builder newStyle = new Google.Maps.Feature.Style.ModeledStructureStyle.Builder(); newStyle.Material = modeledMaterial; //Debug.Log(args.MapFeature.GameObjectName()); Debug.Log(args.MapFeature.MapFeatureMetadata.Name); args.Style = newStyle.Build(); }
/// <summary> /// Triggered by the Maps SDK during the loading process. /// Notifies the SDK if the GameObject for modeled structures needs to be created (or not) /// based on the value of the UI flag. /// </summary> void OnWillCreateModeledStructure(WillCreateModeledStructureArgs args) { args.Cancel = !ShowModeledStructures; }
/// <summary> /// Handle <see cref="ModeledStructureEvents.WillCreate"/> event by specifying the modeled /// structure styles. /// </summary> /// <param name="args"></param> public void HandleWillCreateModeledStructure(WillCreateModeledStructureArgs args) { args.Style = GameObjectOptions.ModeledStructureStyle; }
/// <summary> /// Handle <see cref="ModeledStructureEvents.WillCreate"/> event by specifying the modeled structure styles. /// </summary> public void HandleWillCreateModeledStructure(WillCreateModeledStructureArgs arguments) { arguments.Style = _mapDefaultStyle.ModeledStructureStyle; }