Select to view content in your preferred language

BUG - Layer-Opacity is not working with ArcGisRaycastHit

294
1
11-25-2024 02:22 AM
IngmarWittmann
Occasional Contributor

Hi,

this code in the arcgiscomponent destroys the layeropactiy functionality

if (renderable.Material.NativeMaterial.HasTexture("_FeatureIds"))
{
//gets the feature ID
var featureIds = (Texture2D)renderable.Material.NativeMaterial.GetTexture("_FeatureIds");

var width = featureIds.width;
int y = (int)Mathf.Floor(output.featureIndex / width);
int x = output.featureIndex - y * width;

var color = featureIds.GetPixel(x, y);
var scaledColor = new Vector4(255f * color.r, 255f * color.g, 255f * color.b, 255f * color.a);
var shift = new Vector4(1, 0x100, 0x10000, 0x1000000);
scaledColor.Scale(shift);

output.featureId = (int)(scaledColor.x + scaledColor.y + scaledColor.z + scaledColor.w);
}

after commenting it out it is working fine.

Greets

0 Kudos
1 Reply
ShaneONeill_144
Esri Contributor

We appreciate you sharing a potential bug with the broader Esri Community; however, Esri does not actively track software defects posted here. The official channel for investigating and validating bugs is Esri Technical Support. All customers experiencing a potential software bug should leverage technical support to report and investigate the issue

By reporting bugs through technical support, Esri can better track the scope and impact of the issue across all our customers and better prioritize it with our product teams. Our teams can also investigate the issue more thoroughly to see if there is a solution, workaround, or patch to get you back up and running as soon as possible.