Skip to content

Commit

Permalink
fix unity ListLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
cathei committed Oct 12, 2023
1 parent b69374f commit c1dd806
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

namespace Cathei.LinqGen.Hidden
{
// Unity List<T> layout: https://github.com/Unity-Technologies/UnityCsReference/blob/3d74e124da422b5ab79e573ca4d5b4829ba09c34/Runtime/Export/Scripting/NoAllocHelpers.bindings.cs#L78
public class ListLayout<T>
{
public T[] Items;
#if !NETCOREAPP3_0_OR_GREATER
#if !UNITY_5_3_OR_NEWER && !NETCOREAPP3_0_OR_GREATER
public Object SyncRoot;
#endif
public int Size;
Expand Down
2 changes: 1 addition & 1 deletion LinqGen.Unity/Packages/com.cathei.linqgen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"author": {
"name": "Maxwell Keonwoo Kang"
},
"version": "0.2.5",
"version": "0.2.6",
"unity": "2020.3",
"description": "Fast Linq-to-object source generator",
"license": "MIT",
Expand Down
3 changes: 2 additions & 1 deletion LinqGen/Core/Misc/ListLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@

namespace Cathei.LinqGen.Hidden
{
// Unity List<T> layout: https://github.com/Unity-Technologies/UnityCsReference/blob/3d74e124da422b5ab79e573ca4d5b4829ba09c34/Runtime/Export/Scripting/NoAllocHelpers.bindings.cs#L78
public class ListLayout<T>
{
public T[] Items;
#if !NETCOREAPP3_0_OR_GREATER
#if !UNITY_5_3_OR_NEWER && !NETCOREAPP3_0_OR_GREATER
public Object SyncRoot;
#endif
public int Size;
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Install from NuGet, both [LinqGen](https://www.nuget.org/packages/LinqGen) as li

```xml
<ItemGroup>
<PackageReference Include="LinqGen" Version="0.2.5" />
<PackageReference Include="LinqGen.Generator" Version="0.2.5" />
<PackageReference Include="LinqGen" Version="0.2.6" />
<PackageReference Include="LinqGen.Generator" Version="0.2.6" />
</ItemGroup>
```

Expand Down

0 comments on commit c1dd806

Please sign in to comment.