Skip to content

Commit d9d7532

Browse files
DaxodeEvergreen
authored andcommitted
[content automatically redacted] touching PlatformDependent folder
1 parent abd46d6 commit d9d7532

4 files changed

Lines changed: 1 addition & 7 deletions

File tree

Packages/com.unity.render-pipelines.core/Runtime/PathTracing/PathTracingUtil.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,7 @@ internal static Material[] GetMaterials(MeshRenderer renderer)
261261

262262
internal static ulong EntityIDToUlong(EntityId id)
263263
{
264-
Debug.Assert(UnsafeUtility.SizeOf<EntityId>() == sizeof(int),
265-
"If this assert is firing, the size of EntityId has changed. Remove the intermediate cast to int below, and cast directly to ulong instead.");
266-
264+
Debug.Assert(UnsafeUtility.SizeOf<EntityId>() == sizeof(ulong), "EntityId should be 8 bytes");
267265
return EntityId.ToULong(id);
268266
}
269267
}

Packages/com.unity.visualeffectgraph/Editor/Expressions/VFXExpressionAbstractValues.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ public override T Get<T>()
270270
{
271271
if (typeof(T) == typeof(EntityId))
272272
return (T)(object)base.Get();
273-
Debug.Assert(UnsafeUtility.SizeOf<EntityId>() == sizeof(int), "EntityId size is not equal to int size, this will cause issues, update to VFXValue<EntityId> instead");
274273

275274
return (T)(object)EditorUtility.EntityIdToObject(base.Get());
276275
}

Packages/com.unity.visualeffectgraph/Editor/GraphView/Elements/Controllers/VFXDataAnchorController.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ public virtual object value
303303
{
304304
if (typeof(UnityObject).IsAssignableFrom(storageType))
305305
{
306-
Debug.Assert(UnsafeUtility.SizeOf<EntityId>()==sizeof(int), "EntityId size is not the same as int, this will cause issues in VFXDataAnchorController");
307306
EntityId entityId = (EntityId)evaluatedValue;
308307
return VFXConverter.ConvertTo(EditorUtility.EntityIdToObject(entityId), storageType);
309308
}

Packages/com.unity.visualeffectgraph/Editor/Types/VFXTypes.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,13 +341,11 @@ public static implicit operator CameraBuffer(Texture texture)
341341

342342
public static implicit operator EntityId(CameraBuffer cameraBuffer)
343343
{
344-
Debug.Assert(UnsafeUtility.SizeOf<EntityId>() == sizeof(int), "EntityId size is not equal to int size, this will cause issues, update to EntityId instead");
345344
return cameraBuffer.texture?.GetEntityId() ?? EntityId.None;
346345
}
347346

348347
public static implicit operator CameraBuffer(EntityId id)
349348
{
350-
Debug.Assert(UnsafeUtility.SizeOf<EntityId>() == sizeof(int), "EntityId size is not equal to int size, this will cause issues, update to EntityId instead");
351349
return new CameraBuffer((Texture)EditorUtility.EntityIdToObject(id));
352350
}
353351
}

0 commit comments

Comments
 (0)