<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Changing Layer settings at runtime in ArcGIS Maps SDK for Unity Questions</title>
    <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/changing-layer-settings-at-runtime/m-p/1286374#M520</link>
    <description>&lt;P&gt;I've tried debugging and the only thing I confirmed that the values of the layer are being changed, but the buildings are not changing visibility or opacity.&lt;/P&gt;&lt;P&gt;Just as a sanity check, here's some snippets&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// Populating the layer list seen in picture        
for (ulong i = 0; i &amp;lt; layers.GetSize(); i++)
    {
        var l = layers.At(i);

        var item = Instantiate&amp;lt;LayerListItem&amp;gt;(_listItemPrefab);
        item.transform.SetParent(_content, false);
        item.Layer = l;
    }

// UI Events
void onToggle(bool on)
{
    _layer.IsVisible = on;
}

void onAlphaChanged(float a)
{
    _layer.Opacity = a;

    updateAlpha();
}&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 05 May 2023 20:13:03 GMT</pubDate>
    <dc:creator>MBambino_ATS</dc:creator>
    <dc:date>2023-05-05T20:13:03Z</dc:date>
    <item>
      <title>Changing Layer settings at runtime</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/changing-layer-settings-at-runtime/m-p/1279372#M492</link>
      <description>&lt;P&gt;I am trying to change Layer Visibility and Opacity during app runtime using a switch on the UI, but nothing changes on the map.&lt;/P&gt;&lt;P&gt;The Layer I am trying to change is added in-editor using the component interface and I&amp;nbsp;&lt;EM&gt;am&lt;/EM&gt; able to change these settings while the game is running and have them reflect on the map. However, when I try to reference the layer in code via the API, nothing changes on the map.&lt;BR /&gt;I am referencing the layer using ArcGISMapComponent.View.Map.Layers.At(index)&lt;/P&gt;&lt;P&gt;The layer shows up here and has all of it's data included based on what I set in the editor.&lt;/P&gt;&lt;P&gt;I have also tried adding the layer via scripting at runtime and in that case, No layer was added to the map, though the aforementioned layer list does contain it&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 360px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/68187i35662AF9DC31E604/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MBambino_ATS_1-1681755913484.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/68186iCF7383118EFCC9AE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MBambino_ATS_1-1681755913484.png" alt="MBambino_ATS_1-1681755913484.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 18:31:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/changing-layer-settings-at-runtime/m-p/1279372#M492</guid>
      <dc:creator>MBambino_ATS</dc:creator>
      <dc:date>2023-04-17T18:31:35Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Layer settings at runtime</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/changing-layer-settings-at-runtime/m-p/1286295#M519</link>
      <description>&lt;P&gt;This workflow should work. Have you been able to debug?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 18:11:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/changing-layer-settings-at-runtime/m-p/1286295#M519</guid>
      <dc:creator>Jade</dc:creator>
      <dc:date>2023-05-05T18:11:38Z</dc:date>
    </item>
    <item>
      <title>Re: Changing Layer settings at runtime</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/changing-layer-settings-at-runtime/m-p/1286374#M520</link>
      <description>&lt;P&gt;I've tried debugging and the only thing I confirmed that the values of the layer are being changed, but the buildings are not changing visibility or opacity.&lt;/P&gt;&lt;P&gt;Just as a sanity check, here's some snippets&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;// Populating the layer list seen in picture        
for (ulong i = 0; i &amp;lt; layers.GetSize(); i++)
    {
        var l = layers.At(i);

        var item = Instantiate&amp;lt;LayerListItem&amp;gt;(_listItemPrefab);
        item.transform.SetParent(_content, false);
        item.Layer = l;
    }

// UI Events
void onToggle(bool on)
{
    _layer.IsVisible = on;
}

void onAlphaChanged(float a)
{
    _layer.Opacity = a;

    updateAlpha();
}&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 05 May 2023 20:13:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/changing-layer-settings-at-runtime/m-p/1286374#M520</guid>
      <dc:creator>MBambino_ATS</dc:creator>
      <dc:date>2023-05-05T20:13:03Z</dc:date>
    </item>
  </channel>
</rss>

