Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
40c91f5
[Port] [6000.4] Revert fix for performance regression caused by incor…
svc-reach-platform-support Jan 7, 2026
e17f452
[Port] [6000.4] docg-8237: Remove extra entry from ToC
svc-reach-platform-support Jan 8, 2026
9d7734f
[Port] [6000.4] docg-7366: Fix links
svc-reach-platform-support Jan 8, 2026
3b1858e
[Port] [6000.4] DOCG-8269 Remove typo in HDRP Fog Volume docs
svc-reach-platform-support Jan 9, 2026
0bf6817
[Port] [6000.4] Fix Frame Debugger disconnecting when Render Graph Vi…
svc-reach-platform-support Jan 9, 2026
87e4f17
[Port] [6000.4] Remove usage of deprecated instanceID APIs in com.uni…
EmilieThaulow Jan 12, 2026
2579091
[Port] [6000.4] Fix issue with depth priming where intermediate textu…
svc-reach-platform-support Jan 12, 2026
49f689e
[Port] [6000.4] UUM-129941 : Fix incorrect APV baking when using samp…
olivierprat Jan 12, 2026
ec8a2ea
[Port] [6000.4] Refactor the Shader Graph doc section about Custom Li…
svc-reach-platform-support Jan 13, 2026
b7e7e02
[Port][6000.4][UUM-131564] Fix `NullReferenceException` when using cu…
april-roszkowski Jan 13, 2026
473534a
[Port] [6000.4] [UUM-129871] Fix performance regression and insuffici…
svc-reach-platform-support Jan 13, 2026
49fed19
[Port] [6000.4] [UUM-131589] Prevent subgraph node starting drag on d…
svc-reach-platform-support Jan 15, 2026
a145130
[Port] [6000.4] 2d/bugfix/uum 127937
svc-reach-platform-support Jan 16, 2026
0662bf1
[Port] [6000.4] [UUM-131603][UUM-131646] Fix some small ShaderGraph U…
svc-reach-platform-support Jan 16, 2026
becb48f
[Port] [6000.4] [VFX] Fix leak of new Mesh with BakeSDF API
svc-reach-platform-support Jan 19, 2026
ff5087a
[6.4] Deprecate FindObjectsSortMode and Object.FindObject* methods th…
joelpryde Jan 20, 2026
fcb3571
[Port] [6000.4] Fixed precision for shadows over large distances
svc-reach-platform-support Jan 20, 2026
f79e45f
[Port] [6000.4] [UUM-131625] Fix subgraphs with only non-numeric outp…
svc-reach-platform-support Jan 20, 2026
7f0d5c2
[Port] [6000.4] [UUM-128839] Fix point light shadow artifact when sof…
svc-reach-platform-support Jan 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ static void UpdateLightStatus()
var sceneLights = new Dictionary<Scene, List<Light>>();

// Modify each baked light, take note of which scenes they belong to.
var allLights = Object.FindObjectsByType<Light>(FindObjectsSortMode.None);
var allLights = Object.FindObjectsByType<Light>();
foreach (var light in allLights)
{
if (light.lightmapBakeType != LightmapBakeType.Realtime)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ internal static List<ProbeVolumePerSceneData> GetPerSceneDataList()

internal static List<ProbeVolume> GetProbeVolumeList()
{
#pragma warning disable CS0618 // Type or member is obsolete
var fullPvList = GameObject.FindObjectsByType<ProbeVolume>(FindObjectsSortMode.InstanceID);
#pragma warning restore CS0618 // Type or member is obsolete
List<ProbeVolume> usedPVList;

if (isBakingSceneSubset)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,13 @@ public BakingBatch(Vector3Int cellCount, ProbeReferenceVolume refVolume)
maxBrickCount = cellCount * ProbeReferenceVolume.CellSize(refVolume.GetMaxSubdivision());
inverseScale = ProbeBrickPool.kBrickCellCount / refVolume.MinBrickSize();
offset = refVolume.ProbeOffset();

// Initialize NativeHashMaps with reasonable initial capacity
// Using a larger capacity to reduce allocations during baking
positionToIndex = new NativeHashMap<int, int>(100000, Allocator.Persistent);
uniqueBrickSubdiv = new NativeHashMap<int, int>(100000, Allocator.Persistent);
}

public void Dispose()
{
if (positionToIndex.IsCreated)
Expand Down Expand Up @@ -746,7 +746,9 @@ static internal void Clear()
if (activeSet != null)
activeSet.Clear();

#pragma warning disable CS0618 // Type or member is obsolete
var probeVolumes = GameObject.FindObjectsByType<ProbeVolume>(FindObjectsSortMode.InstanceID);
#pragma warning restore CS0618 // Type or member is obsolete
foreach (var probeVolume in probeVolumes)
probeVolume.OnLightingDataAssetCleared();
}
Expand Down Expand Up @@ -879,7 +881,9 @@ static void CellCountInDirections(out Vector3Int minCellPositionXYZ, out Vector3
static TouchupVolumeWithBoundsList GetAdjustementVolumes()
{
// This is slow, but we should have very little amount of touchup volumes.
#pragma warning disable CS0618 // Type or member is obsolete
var touchupVolumes = Object.FindObjectsByType<ProbeAdjustmentVolume>(FindObjectsSortMode.InstanceID);
#pragma warning restore CS0618 // Type or member is obsolete

var touchupVolumesAndBounds = new TouchupVolumeWithBoundsList(touchupVolumes.Length);
foreach (var touchup in touchupVolumes)
Expand Down Expand Up @@ -1098,7 +1102,7 @@ static void BakeDelegate(ref float progress, ref bool done)
{
FixSeams(
s_BakeData.positionRemap,
s_BakeData.originalPositions,
s_BakeData.sortedPositions,
s_BakeData.lightingJob.irradiance,
s_BakeData.lightingJob.validity,
s_BakeData.lightingJob.occlusion,
Expand Down Expand Up @@ -1323,7 +1327,7 @@ internal static void FixSeams(
NativeArray<Vector4> skyOcclusion,
NativeArray<uint> renderingLayerMasks)
{
// Seams are caused are caused by probes on the boundary between two subdivision levels
// Seams are caused by probes on the boundary between two subdivision levels
// The idea is to find first them and do a kind of dilation to smooth the values on the boundary
// the dilation process consits in doing a trilinear sample of the higher subdivision brick and override the lower subdiv with that
// We have to mark the probes on the boundary as valid otherwise leak reduction at runtime will interfere with this method
Expand Down Expand Up @@ -1443,7 +1447,8 @@ Vector3Int GetCellPositionFromVoxel(Vector3Int voxelToLookup, int cellSizeInBric
{
uint renderingLayerMask = renderingLayerMasks[positionRemap[index]];
bool commonRenderingLayer = (renderingLayerMask & probeRenderingLayerMask) != 0;
if (!commonRenderingLayer) continue; // We do not use this probe contribution if it does not share at least a common rendering layer
if (!commonRenderingLayer)
continue; // We do not use this probe contribution if it does not share at least a common rendering layer
}

// Do the lerp in compressed format to match result on GPU
Expand Down Expand Up @@ -1512,7 +1517,7 @@ static void ApplyPostBakeOperations()
var chunkSizeInProbes = ProbeBrickPool.GetChunkSizeInProbeCount();
var hasVirtualOffsets = m_BakingSet.settings.virtualOffsetSettings.useVirtualOffset;
var hasRenderingLayers = m_BakingSet.useRenderingLayers;

if (!ValidateBakingCellsSize(bakingCellsArray, chunkSizeInProbes, hasVirtualOffsets, hasRenderingLayers))
return; // Early exit if validation fails

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ static void UpdateRealtimeSubdivisionDebug()

if (Time.realtimeSinceStartupAsDouble - s_LastSubdivisionTime > debugDisplay.subdivisionDelayInSeconds)
{
#pragma warning disable CS0618 // Type or member is obsolete
var probeVolume = GameObject.FindFirstObjectByType<ProbeVolume>();
#pragma warning restore CS0618 // Type or member is obsolete
if (probeVolume == null || !probeVolume.isActiveAndEnabled)
return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,9 @@ internal class ProbeVolumeOverlay : Overlay, ITransientOverlay
{
if (ProbeReferenceVolume.instance.probeVolumeDebug.realtimeSubdivision)
{
#pragma warning disable CS0618 // Type or member is obsolete
var probeVolume = GameObject.FindFirstObjectByType<ProbeVolume>();
#pragma warning restore CS0618 // Type or member is obsolete
if (probeVolume != null && probeVolume.isActiveAndEnabled)
{
var profile = ProbeVolumeBakingSet.GetBakingSetForScene(probeVolume.gameObject.scene);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ public PlayerConnection(IConnectionState connectionState, UnityEngine.Events.Uni
EditorConnection.instance.Initialize();
EditorConnection.instance.RegisterConnection(m_OnPlayerConnected);
EditorConnection.instance.RegisterDisconnection(m_OnPlayerDisconnected);

EditorApplication.quitting += OnEditorQuitting;
}

public void Dispose()
Expand All @@ -35,27 +33,15 @@ public void Dispose()
EditorConnection.instance.UnregisterConnection(m_OnPlayerConnected);
EditorConnection.instance.UnregisterDisconnection(m_OnPlayerDisconnected);

// NOTE: There is a bug where editor crashes if we call DisconnectAll during shutdown flow. In this case
// it's fine to skip the disconnect as the player will get notified of it anyway.
if (!m_EditorQuitting)
EditorConnection.instance.DisconnectAll();

m_ConnectionState.Dispose();
m_ConnectionState = null;

EditorApplication.quitting -= OnEditorQuitting;
}
}

public void OnConnectionDropdownIMGUI()
{
PlayerConnectionGUILayout.ConnectionTargetSelectionDropdown(m_ConnectionState, EditorStyles.toolbarDropDown, 250);
}

void OnEditorQuitting()
{
m_EditorQuitting = true;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,9 @@ void EnsurePersistentCanvas()
{
if (m_RootUIPersistentCanvas == null)
{
#pragma warning disable CS0618 // Type or member is obsolete
var uiManager = UnityObject.FindFirstObjectByType<DebugUIHandlerPersistentCanvas>();
#pragma warning restore CS0618 // Type or member is obsolete

if (uiManager == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ internal static void HandleInternalEventSystemComponents(bool uiEnabled)

void EnsureExactlyOneEventSystem()
{
var eventSystems = FindObjectsByType<EventSystem>(FindObjectsSortMode.None);
var eventSystems = FindObjectsByType<EventSystem>();
var debugEventSystem = GetComponent<EventSystem>();

if (eventSystems.Length > 1 && debugEventSystem != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -924,12 +924,12 @@ private unsafe struct FindRenderersFromMaterialOrMeshJob : IJobParallelForBatch

public void Execute(int startIndex, int count)
{
int* renderersToAddForMaterialsPtr = stackalloc int[k_BatchSize];
var renderersToAddForMaterials = new UnsafeList<int>(renderersToAddForMaterialsPtr, k_BatchSize);
EntityId* renderersToAddForMaterialsPtr = stackalloc EntityId[k_BatchSize];
var renderersToAddForMaterials = new UnsafeList<EntityId>(renderersToAddForMaterialsPtr, k_BatchSize);
renderersToAddForMaterials.Length = 0;

int* renderersToAddForMeshesPtr = stackalloc int[k_BatchSize];
var renderersToAddForMeshes = new UnsafeList<int>(renderersToAddForMeshesPtr, k_BatchSize);
EntityId* renderersToAddForMeshesPtr = stackalloc EntityId[k_BatchSize];
var renderersToAddForMeshes = new UnsafeList<EntityId>(renderersToAddForMeshesPtr, k_BatchSize);
renderersToAddForMeshes.Length = 0;

for (int index = 0; index < count; index++)
Expand All @@ -945,9 +945,7 @@ public void Execute(int startIndex, int count)
var meshID = meshIDArray[rendererIndex];
if (meshIDs.Contains(meshID))
{
#pragma warning disable 618 // todo @emilie.thaulow make renderID an EntityId
renderersToAddForMeshes.AddNoResize(rendererID);
#pragma warning restore 618
// We can skip the material check if we found a mesh match since at this point
// the renderer is already added and will be processed by the mesh branch
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ internal enum FilteringJobMode
internal unsafe struct DrawCommandOutputFiltering : IJob
{
[ReadOnly] public NativeParallelHashMap<uint, BatchID> batchIDs;
[ReadOnly] public int viewID;
[ReadOnly] public EntityId viewID;

[ReadOnly] public GPUInstanceDataBuffer.ReadOnly instanceDataBuffer;

Expand Down Expand Up @@ -1816,10 +1816,8 @@ private JobHandle AnimateCrossFades(CPUPerCameraInstanceData perCameraInstanceDa
}

//For main camera, animate crossfades, and store the result in the hashmap to be retrieved by other cameras
var viewID = cc.viewID.GetInstanceID();
#pragma warning disable 618 // todo @emilie.thaulow make viewID an EntityId
hasAnimatedCrossfade = perCameraInstanceData.perCameraData.TryGetValue(viewID, out var tmpCameraInstanceData);
#pragma warning restore 618
var viewID = cc.viewID;
hasAnimatedCrossfade = perCameraInstanceData.perCameraData.TryGetValue(viewID.GetEntityId(), out var tmpCameraInstanceData);
if (hasAnimatedCrossfade == false)
{
// For picking / filtering and outlining passes. We do not have animated crossfade data.
Expand All @@ -1836,9 +1834,7 @@ private JobHandle AnimateCrossFades(CPUPerCameraInstanceData perCameraInstanceDa
crossFadeArray = cameraInstanceData.crossFades
}.Schedule(perCameraInstanceData.instancesLength, AnimateCrossFadeJob.k_BatchSize);

#pragma warning disable 618 // todo @emilie.thaulow make viewID an EntityId
m_LODParamsToCameraID.TryAdd(lodHash, new AnimatedFadeData(){ cameraID = viewID, jobHandle = handle});
#pragma warning restore 618
m_LODParamsToCameraID.TryAdd(lodHash, new AnimatedFadeData(){ cameraID = viewID.GetEntityId(), jobHandle = handle});
return handle;
}

Expand Down Expand Up @@ -1868,10 +1864,8 @@ private unsafe JobHandle CreateFrustumCullingJob(
InstanceCullerBurst.SetupCullingJobInput(QualitySettings.lodBias, QualitySettings.meshLodThreshold, contextPtr, &receiverPlanes, &receiverSphereCuller,
&frustumPlaneCuller, &screenRelativeMetric, &meshLodConstant);
}
#pragma warning disable 618 // todo @emilie.thaulow make GetInstanceID return EntityId
if (occlusionCullingCommon != null)
occlusionCullingCommon.UpdateSilhouettePlanes(cc.viewID.GetInstanceID(), receiverPlanes.SilhouettePlaneSubArray());
#pragma warning restore 618
occlusionCullingCommon.UpdateSilhouettePlanes(cc.viewID.GetEntityId(), receiverPlanes.SilhouettePlaneSubArray());

var jobHandle = AnimateCrossFades(perCameraInstanceData, cc, out var cameraInstanceData, out var hasAnimatedCrossfade);

Expand Down Expand Up @@ -2012,9 +2006,7 @@ public unsafe JobHandle CreateCullJobTree(
int debugCounterBaseIndex = -1;
if (m_DebugStats?.enabled ?? false)
{
#pragma warning disable 618 // todo @emilie.thaulow make GetInstanceID return EntityId
debugCounterBaseIndex = m_SplitDebugArray.TryAddSplits(cc.viewType, cc.viewID.GetInstanceID(), cc.cullingSplits.Length);
#pragma warning restore 618
debugCounterBaseIndex = m_SplitDebugArray.TryAddSplits(cc.viewType, cc.viewID.GetEntityId(), cc.cullingSplits.Length);
}

var batchCount = drawInstanceData.drawBatches.Length;
Expand All @@ -2030,16 +2022,12 @@ public unsafe JobHandle CreateCullJobTree(
var binVisibleInstanceOffsets = new NativeArray<int>(maxBinCount, Allocator.TempJob, NativeArrayOptions.UninitializedMemory);

int indirectContextIndex = -1;
#pragma warning disable 618 //todo @emilie.thaulow make GetInstanceID return EntityId
bool useOcclusionCulling = (occlusionCullingCommon != null) && occlusionCullingCommon.HasOccluderContext(cc.viewID.GetInstanceID());
#pragma warning restore 618
bool useOcclusionCulling = (occlusionCullingCommon != null) && occlusionCullingCommon.HasOccluderContext(cc.viewID.GetEntityId());
if (useOcclusionCulling)
{
#pragma warning disable 618 // todo @emilie.thaulow make GetInstanceID return EntityId
int viewInstanceID = cc.viewID.GetInstanceID();
indirectContextIndex = m_IndirectStorage.TryAllocateContext(viewInstanceID);
#pragma warning restore 618
cullingOutput.customCullingResult[0] = (IntPtr)viewInstanceID;
EntityId viewEntityId = cc.viewID.GetEntityId();
indirectContextIndex = m_IndirectStorage.TryAllocateContext(viewEntityId);
cullingOutput.customCullingResult[0] = (IntPtr)viewEntityId.GetRawData();
}
IndirectBufferLimits indirectBufferLimits = m_IndirectStorage.GetLimits(indirectContextIndex);
NativeArray<IndirectBufferAllocInfo> indirectBufferAllocInfo = m_IndirectStorage.GetAllocInfoSubArray(indirectContextIndex);
Expand Down Expand Up @@ -2201,7 +2189,7 @@ private JobHandle CreateFilteringCullingOutputJob_EditorOnly(in BatchCullingCont

var drawOutputJob = new DrawCommandOutputFiltering
{
viewID = cc.viewID.GetInstanceID(),
viewID = cc.viewID.GetEntityId(),
batchIDs = batchIDs,
instanceDataBuffer = instanceDataBuffer,
rendererVisibilityMasks = rendererVisibilityMasks,
Expand Down Expand Up @@ -2244,7 +2232,7 @@ private JobHandle CreatePickingCullingOutputJob_EditorOnly(in BatchCullingContex

var drawOutputJob = new DrawCommandOutputFiltering
{
viewID = cc.viewID.GetInstanceID(),
viewID = cc.viewID.GetEntityId(),
batchIDs = batchIDs,
instanceDataBuffer = instanceDataBuffer,
rendererVisibilityMasks = rendererVisibilityMasks,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ internal struct FindNonRegisteredMaterialsJob : IJobParallelForBatch

public unsafe void Execute(int startIndex, int count)
{
int* notFoundinstanceIDsPtr = stackalloc int[k_BatchSize];
var notFoundinstanceIDs = new UnsafeList<int>(notFoundinstanceIDsPtr, k_BatchSize);
EntityId* notFoundinstanceIDsPtr = stackalloc EntityId[k_BatchSize];
var notFoundinstanceIDs = new UnsafeList<EntityId>(notFoundinstanceIDsPtr, k_BatchSize);

GPUDrivenPackedMaterialData* notFoundPackedMaterialDatasPtr = stackalloc GPUDrivenPackedMaterialData[k_BatchSize];
var notFoundPackedMaterialDatas = new UnsafeList<GPUDrivenPackedMaterialData>(notFoundPackedMaterialDatasPtr, k_BatchSize);
Expand All @@ -244,9 +244,7 @@ public unsafe void Execute(int startIndex, int count)

if (!hashMap.ContainsKey(entityId))
{
#pragma warning disable 618 // todo @emilie.thaulow fix this
notFoundinstanceIDs.AddNoResize(entityId);
#pragma warning restore 618
notFoundPackedMaterialDatas.AddNoResize(packedMaterialDatas[i]);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ static void InflateBound(ref Bounds bounds, ProbeVolume pv)

internal void UpdateSceneBounds(Scene scene, string sceneGUID, bool onSceneSave)
{
var volumes = FindObjectsByType<ProbeVolume>(FindObjectsSortMode.None);
var volumes = FindObjectsByType<ProbeVolume>();
float prevBrickSize = ProbeReferenceVolume.instance.MinBrickSize();
int prevMaxSubdiv = ProbeReferenceVolume.instance.GetMaxSubdivision();
Vector3 prevOffset = ProbeReferenceVolume.instance.ProbeOffset();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ void PushTerrain(Terrain terrain)
}
else
{
#pragma warning disable CS0618 // Type or member is obsolete
var renderers = Object.FindObjectsByType<Renderer>(FindObjectsSortMode.InstanceID);
#pragma warning restore CS0618 // Type or member is obsolete
Profiling.Profiler.BeginSample($"Find Renderers ({renderers.Length})");
foreach (var renderer in renderers)
{
Expand All @@ -205,7 +207,9 @@ void PushTerrain(Terrain terrain)
}
Profiling.Profiler.EndSample();

#pragma warning disable CS0618 // Type or member is obsolete
var terrains = Object.FindObjectsByType<Terrain>(FindObjectsSortMode.InstanceID);
#pragma warning restore CS0618 // Type or member is obsolete
Profiling.Profiler.BeginSample($"Find Terrains ({terrains.Length})");
foreach (var terrain in terrains)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public void Update(CommandBuffer cmd, PathTracingSettings settings)
if (settings.lightPickingMethod == LightPickingMethod.Regir ||
settings.lightPickingMethod == LightPickingMethod.LightGrid)
{
var sceneRenderers = Object.FindObjectsByType<Renderer>(FindObjectsSortMode.None);
var sceneRenderers = Object.FindObjectsByType<Renderer>();
foreach (Renderer r in sceneRenderers)
sceneBounds.Encapsulate(r.bounds);
}
Expand Down
Loading