Browse Source

update: lua.unity dependencies

Akeit0 6 months ago
parent
commit
2d53c89fb7

BIN
src/Lua.Unity/Assets/Sandbox/Resources/test.luac


+ 4 - 2
src/Lua.Unity/Assets/Sandbox/Sandbox.cs

@@ -12,7 +12,7 @@ public class Sandbox : MonoBehaviour
     async void Start()
     {
         var state = LuaState.Create( new LuaPlatform(
-            fileSystem: new FileSystem(),
+            fileSystem: new FileSystem(Application.streamingAssetsPath),
             osEnvironment: new UnityApplicationOsEnvironment(),
             standardIO: new UnityStandardIO(),
             timeProvider: TimeProvider.System
@@ -35,7 +35,9 @@ foo.greet()
 local bar = require 'bar'
 bar.greet()
 require 'test'
-os.exit(0)
+
+local s =require 'streaming'
+s.f()
 ", cancellationToken: destroyCancellationToken);
         }
         catch (Exception ex)

+ 1 - 0
src/Lua.Unity/Assets/StreamingAssets/streaming.lua

@@ -0,0 +1 @@
+return { f= function()print("loaded from streaming.lua")end }

+ 3 - 0
src/Lua.Unity/Assets/StreamingAssets/streaming.lua.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: f05262e5f419479c940d5486b1c58a00
+timeCreated: 1749995150

+ 2 - 2
src/Lua.Unity/Packages/nuget-packages/packages.config

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.6" />
-  <package id="Microsoft.Bcl.TimeProvider" version="9.0.6" manuallyInstalled="true" />
+  <package id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0" />
+  <package id="Microsoft.Bcl.TimeProvider" version="8.0.0" manuallyInstalled="true" />
   <package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" manuallyInstalled="true" />
 </packages>