<?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 Modifying ArcGISMap Component by C# script doesn't update Component in Inspector in ArcGIS Maps SDK for Unity Questions</title>
    <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/modifying-arcgismap-component-by-c-script-doesn-t/m-p/1606820#M1087</link>
    <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;While working on C# scripts to build a scene I noticed that changes made by the script to basemap and elevation settings are not mirrored in the ArcGISMap Component after the script has been run. Functionality is fine, but it's somewhat confusing that the Inspector data in basemap and elevation sections do not change at all.&lt;/P&gt;&lt;P&gt;Thanks and best regards&lt;/P&gt;&lt;P&gt;Winfried&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;My environment:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Windows 11 Pro, Version 23H2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Unity 6 (6000.0.23f1)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ArcGIS Maps SDK for Unity 1.7&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what the Inspector looks like with ArcGISMap GameObject selected.&lt;/P&gt;&lt;P&gt;No basemap and elevation source is disabled.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ws4945894_0-1744883501446.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/130427i08AC8E82A023314A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ws4945894_0-1744883501446.png" alt="ws4945894_0-1744883501446.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Code snippet from C# script&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private void CreateArcGISMap()
{
    // Initialize Map

    arcGISMap = new ArcGISMap(arcGISMapComponent.MapType);

    // Set the Basemap

    arcGISMap.Basemap = new ArcGISBasemap(ArcGISBasemapStyle.ArcGISImagery, APIKey);

    // Create the Elevation

    ArcGISImageElevationSource arcGISImageElevationSource = new ArcGISImageElevationSource
               ("https://elevation3d.arcgis.com/arcgis/rest/services/
               WorldElevation3D/Terrain3D/ImageServer", APIKey);

    // Set the Elevation Source Name

    arcGISImageElevationSource.Name = "TestElevation";

    // Enable the Elevation Source

    arcGISImageElevationSource.IsEnabled = true;

    // Assign the Elevation Source to the ArcGISMap

    arcGISMap.Elevation = new ArcGISMapElevation(arcGISImageElevationSource);&lt;/LI-CODE&gt;&lt;P&gt;After running the C# script everything’s fine. Most importantly basemap and elevation are obviously applied in the Game View window.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ws4945894_1-1744883662809.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/130428i16DB3EABA0EBAC82/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ws4945894_1-1744883662809.png" alt="ws4945894_1-1744883662809.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But the Component isn’t updated at all (please see screenshot).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ws4945894_2-1744883694726.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/130429iCB79DE383DD14B1A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ws4945894_2-1744883694726.png" alt="ws4945894_2-1744883694726.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, if the elevation is disabled in the C# script like so&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;arcGISImageElevationSource.IsEnabled = false;&lt;/LI-CODE&gt;&lt;P&gt;it shows in the scene when the script is run again. So the functionality seems to be fine but the updated values are not shown in the Component itself.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ws4945894_3-1744883778679.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/130430i8C0B961977FE5982/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ws4945894_3-1744883778679.png" alt="ws4945894_3-1744883778679.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 17 Apr 2025 09:57:58 GMT</pubDate>
    <dc:creator>ws4945894</dc:creator>
    <dc:date>2025-04-17T09:57:58Z</dc:date>
    <item>
      <title>Modifying ArcGISMap Component by C# script doesn't update Component in Inspector</title>
      <link>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/modifying-arcgismap-component-by-c-script-doesn-t/m-p/1606820#M1087</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;While working on C# scripts to build a scene I noticed that changes made by the script to basemap and elevation settings are not mirrored in the ArcGISMap Component after the script has been run. Functionality is fine, but it's somewhat confusing that the Inspector data in basemap and elevation sections do not change at all.&lt;/P&gt;&lt;P&gt;Thanks and best regards&lt;/P&gt;&lt;P&gt;Winfried&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;My environment:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Windows 11 Pro, Version 23H2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Unity 6 (6000.0.23f1)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;ArcGIS Maps SDK for Unity 1.7&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what the Inspector looks like with ArcGISMap GameObject selected.&lt;/P&gt;&lt;P&gt;No basemap and elevation source is disabled.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ws4945894_0-1744883501446.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/130427i08AC8E82A023314A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ws4945894_0-1744883501446.png" alt="ws4945894_0-1744883501446.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Code snippet from C# script&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private void CreateArcGISMap()
{
    // Initialize Map

    arcGISMap = new ArcGISMap(arcGISMapComponent.MapType);

    // Set the Basemap

    arcGISMap.Basemap = new ArcGISBasemap(ArcGISBasemapStyle.ArcGISImagery, APIKey);

    // Create the Elevation

    ArcGISImageElevationSource arcGISImageElevationSource = new ArcGISImageElevationSource
               ("https://elevation3d.arcgis.com/arcgis/rest/services/
               WorldElevation3D/Terrain3D/ImageServer", APIKey);

    // Set the Elevation Source Name

    arcGISImageElevationSource.Name = "TestElevation";

    // Enable the Elevation Source

    arcGISImageElevationSource.IsEnabled = true;

    // Assign the Elevation Source to the ArcGISMap

    arcGISMap.Elevation = new ArcGISMapElevation(arcGISImageElevationSource);&lt;/LI-CODE&gt;&lt;P&gt;After running the C# script everything’s fine. Most importantly basemap and elevation are obviously applied in the Game View window.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ws4945894_1-1744883662809.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/130428i16DB3EABA0EBAC82/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ws4945894_1-1744883662809.png" alt="ws4945894_1-1744883662809.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But the Component isn’t updated at all (please see screenshot).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ws4945894_2-1744883694726.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/130429iCB79DE383DD14B1A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ws4945894_2-1744883694726.png" alt="ws4945894_2-1744883694726.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, if the elevation is disabled in the C# script like so&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;arcGISImageElevationSource.IsEnabled = false;&lt;/LI-CODE&gt;&lt;P&gt;it shows in the scene when the script is run again. So the functionality seems to be fine but the updated values are not shown in the Component itself.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ws4945894_3-1744883778679.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/130430i8C0B961977FE5982/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ws4945894_3-1744883778679.png" alt="ws4945894_3-1744883778679.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Apr 2025 09:57:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-maps-sdk-for-unity-questions/modifying-arcgismap-component-by-c-script-doesn-t/m-p/1606820#M1087</guid>
      <dc:creator>ws4945894</dc:creator>
      <dc:date>2025-04-17T09:57:58Z</dc:date>
    </item>
  </channel>
</rss>

