some updates

This commit is contained in:
FloatGaming
2026-07-25 08:31:10 +08:00
parent af8a0b6810
commit 86351dbd2a
225 changed files with 46757 additions and 590 deletions
@@ -50,6 +50,7 @@ public class TrackTouchRegionLayoutController : MonoBehaviour
if (mobileOnly && !Application.isMobilePlatform)
{
DisableTouchRegionsForCurrentPlatform();
return;
}
@@ -115,4 +116,30 @@ public class TrackTouchRegionLayoutController : MonoBehaviour
touchRegion.trackIndex = trackIndex;
}
private void DisableTouchRegionsForCurrentPlatform()
{
EnsureDefaultBindings();
for (int i = 0; i < regions.Length; i++)
{
RegionBinding binding = regions[i];
if (binding == null || binding.regionObject == null)
{
continue;
}
Image image = binding.regionObject.GetComponent<Image>();
if (image != null)
{
image.raycastTarget = false;
}
TrackTouchRegion touchRegion = binding.regionObject.GetComponent<TrackTouchRegion>();
if (touchRegion != null)
{
touchRegion.enabled = false;
}
}
}
}