Skip to content

Commit d199828

Browse files
committed
Update meta files to 2019.3.11f1
1 parent 418d91e commit d199828

18 files changed

+42
-24
lines changed

CHANGELOG.md.meta

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples.meta

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/PythonHelloWorld.cs.meta

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/PythonLibrary.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using UnityEngine;
22
using IronPython.Hosting;
3+
using IronPython.Runtime;
34

45
namespace Exodrifter.UnityPython.Examples
56
{
@@ -24,6 +25,12 @@ import os
2425
var source = engine.CreateScriptSourceFromString(code);
2526
source.Execute(scope);
2627

28+
// First, compile the python module to a dll
29+
// ClrModule.CompileModules();
30+
31+
// Then, load it
32+
engine.ImportModule("ctypes");
33+
2734
Debug.Log(scope.GetVariable<string>("filename"));
2835
}
2936
}

Examples/PythonLibrary.cs.meta

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Examples/PythonUnityHelloWorld.cs.meta

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

IronPython-2.7.9/IKVM.Reflection.dll.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

IronPython-2.7.9/IronPython.Modules.dll.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

IronPython-2.7.9/IronPython.SQLite.dll.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

IronPython-2.7.9/IronPython.dll.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

IronPython-2.7.9/Microsoft.Dynamic.dll.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

IronPython-2.7.9/Microsoft.Scripting.Metadata.dll.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

IronPython-2.7.9/Microsoft.Scripting.dll.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE.txt.meta

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md.meta

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Scripts.meta

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Scripts/UnityPython.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@ public static ScriptEngine CreateEngine(IDictionary<string, object> options = nu
3131
var errorWriter = new UnityLogWriter(Debug.LogError, errorStream);
3232
engine.Runtime.IO.SetErrorOutput(errorStream, errorWriter);
3333

34-
3534
// Load assemblies for the `UnityEngine*` namespaces
3635
foreach (var assembly in GetAssembliesInNamespace("UnityEngine"))
3736
{
3837
engine.Runtime.LoadAssembly(assembly);
3938
}
4039

41-
#if UNITY_EDITOR
4240
// Load assemblies for the `UnityEditor*` namespaces
43-
foreach (var assembly in GetAssembliesInNamespace("UnityEditor"))
41+
if (Application.isEditor)
4442
{
45-
engine.Runtime.LoadAssembly(assembly);
43+
foreach (var assembly in GetAssembliesInNamespace("UnityEditor"))
44+
{
45+
engine.Runtime.LoadAssembly(assembly);
46+
}
4647
}
47-
#endif
4848

4949
return engine;
5050
}

Scripts/UnityPython.cs.meta

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)