Skip to content

Commit

Permalink
update unity
Browse files Browse the repository at this point in the history
  • Loading branch information
s5suzuki committed May 20, 2024
1 parent 4e623ea commit 75a9672
Show file tree
Hide file tree
Showing 41 changed files with 194 additions and 898 deletions.
7 changes: 3 additions & 4 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,13 +464,12 @@ def copy_dll_unity(config: Config):
shutil.copy(dll, "unity/Assets/Plugins/x86_64")
rmtree_f("bin")

url = f"https://github.com/shinolab/autd3-capi/releases/download/v{version}/autd3-v{version}-macos-unity-universal-shared.tar.gz"
url = f"https://github.com/shinolab/autd3-capi/releases/download/v{version}/autd3-v{version}-macos-unity-aarch64-shared.tar.gz"
urllib.request.urlretrieve(url, "tmp.tar.gz")
with tarfile.open("tmp.tar.gz", "r:gz") as tar:
tar.extractall()
rm_f("tmp.tar.gz")
for dll in glob.glob("bin/*.dylib"):
shutil.copy(dll, "unity/Assets/Plugins/x86_64")
shutil.copy(dll, "unity/Assets/Plugins/aarch64")
rmtree_f("bin")

Expand Down Expand Up @@ -517,8 +516,8 @@ def unity_build(args):
rmtree_f("unity/Assets/Scripts/bin")
rmtree_f("unity/Assets/Scripts/native")
shutil.copy(
"src/NativeMethods/DefExt.cs",
"unity/Assets/Scripts/NativeMethods/DefExt.cs",
"src/NativeMethods/DriverExt.cs",
"unity/Assets/Scripts/NativeMethods/DriverExt.cs",
)

shutil.copy(
Expand Down
8 changes: 8 additions & 0 deletions src/Driver/Datagram/PulseWidthEncoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
using System;
using System.Collections.Generic;

#if UNITY_2020_2_OR_NEWER
#nullable enable
#endif

namespace AUTD3Sharp
{
public sealed class PulseWidthEncoder : IDatagram
Expand Down Expand Up @@ -33,3 +37,7 @@ DatagramPtr IDatagram.Ptr(Geometry geometry)
}
}
}

#if UNITY_2020_2_OR_NEWER
#nullable restore
#endif
8 changes: 8 additions & 0 deletions src/Driver/Defined/Freq.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
using System;

#if UNITY_2020_2_OR_NEWER
#nullable enable
#endif

namespace AUTD3Sharp
{
public readonly struct Freq<T> : IEquatable<Freq<T>> where T : struct
Expand Down Expand Up @@ -39,3 +43,7 @@ public static partial class Units
public static UnitHz Hz { get; } = new UnitHz();
}
}

#if UNITY_2020_2_OR_NEWER
#nullable restore
#endif

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 0 additions & 69 deletions unity/Assets/Plugins/x86_64/libautd3capi.dylib.meta

This file was deleted.

69 changes: 0 additions & 69 deletions unity/Assets/Plugins/x86_64/libautd3capi_def.dylib.meta

This file was deleted.

63 changes: 0 additions & 63 deletions unity/Assets/Plugins/x86_64/libautd3capi_def.so.meta

This file was deleted.

Loading

0 comments on commit 75a9672

Please sign in to comment.