<?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 Remove layer with button - Unity VR in ArcGIS Maps SDK for Unity Questions</title>
    <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/remove-layer-with-button-unity-vr/m-p/1234363#M324</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I made a button on a panel and when i push the button i wanna remove a layer.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WH1981_0-1669159309862.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/56653iCC0B80DCF6F2F6F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WH1981_0-1669159309862.png" alt="WH1981_0-1669159309862.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;the Onclick function on the button. But i don't know the workaround of this.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WH1981_1-1669159603479.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/56654i4F96C09F0A807A41/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WH1981_1-1669159603479.png" alt="WH1981_1-1669159603479.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The script that must run on click button to remove a layer:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WH1981_3-1669159669199.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/56656iFE63AA51EB43E91F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WH1981_3-1669159669199.png" alt="WH1981_3-1669159669199.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;can someone help me&lt;/P&gt;</description>
    <pubDate>Tue, 22 Nov 2022 23:32:27 GMT</pubDate>
    <dc:creator>WH1981</dc:creator>
    <dc:date>2022-11-22T23:32:27Z</dc:date>
    <item>
      <title>Remove layer with button - Unity VR</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/remove-layer-with-button-unity-vr/m-p/1234363#M324</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I made a button on a panel and when i push the button i wanna remove a layer.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WH1981_0-1669159309862.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/56653iCC0B80DCF6F2F6F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WH1981_0-1669159309862.png" alt="WH1981_0-1669159309862.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;the Onclick function on the button. But i don't know the workaround of this.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WH1981_1-1669159603479.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/56654i4F96C09F0A807A41/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WH1981_1-1669159603479.png" alt="WH1981_1-1669159603479.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The script that must run on click button to remove a layer:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WH1981_3-1669159669199.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/56656iFE63AA51EB43E91F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WH1981_3-1669159669199.png" alt="WH1981_3-1669159669199.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;can someone help me&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 23:32:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/remove-layer-with-button-unity-vr/m-p/1234363#M324</guid>
      <dc:creator>WH1981</dc:creator>
      <dc:date>2022-11-22T23:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Remove layer with button - Unity VR</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/remove-layer-with-button-unity-vr/m-p/1234373#M326</link>
      <description>&lt;P&gt;You're pretty close. Change:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;void Update()&lt;/LI-CODE&gt;&lt;P&gt;to:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public void RemoveLayer()
{
    Debug.Log("Remove Layer");
    ArcGISMap.Layers.Remove(my_layer);
}&lt;/LI-CODE&gt;&lt;P&gt;You'll find the function in the button dropdown list that you circled under "No Function". Press play and click the button to see results&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 00:25:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/remove-layer-with-button-unity-vr/m-p/1234373#M326</guid>
      <dc:creator>StephenNauman</dc:creator>
      <dc:date>2022-11-23T00:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: Remove layer with button - Unity VR</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/remove-layer-with-button-unity-vr/m-p/1237140#M354</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a update:&lt;/P&gt;&lt;P&gt;Its working now that i remove a layer in Play modus, but the Map rebuilds and ArcGIS tells this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/unity/layers/" target="_blank"&gt;https://developers.arcgis.com/unity/layers/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WH1981_0-1669966431908.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/57453i6492591254D2703C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WH1981_0-1669966431908.png" alt="WH1981_0-1669966431908.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is my code:&lt;/P&gt;&lt;P&gt;The var ArcGISMap is not public i think. I need push the function public void CreateArcGISMap() to remove a layer. But i don't want to rebuild the map.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WH1981_1-1669966463651.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/57454i11FEECA58256D464/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WH1981_1-1669966463651.png" alt="WH1981_1-1669966463651.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Or is this not possible?&lt;/P&gt;&lt;P&gt;ps: laag_2.Opacity = 0.1f; is not working.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2022 07:38:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/remove-layer-with-button-unity-vr/m-p/1237140#M354</guid>
      <dc:creator>WH1981</dc:creator>
      <dc:date>2022-12-02T07:38:51Z</dc:date>
    </item>
  </channel>
</rss>

