From 2870d3ce4d31640eb97211ae9254d1ce1e84dfcc Mon Sep 17 00:00:00 2001 From: Kazuki Sakamoto Date: Thu, 6 Oct 2016 06:04:54 -0700 Subject: [PATCH] Remove .dll from DllName for other platforms Summary: - Different platforms have different naming conventions - http://www.mono-project.com/docs/advanced/pinvoke/#library-names - Unity iOS requires special name `__Internal` - https://docs.unity3d.com/Manual/PluginsForIOS.html Reviewed By: emilsjolander Differential Revision: D3976369 fbshipit-source-id: 4c1d7fe226c5c2a89531ee1c2ee8b47df847b3e4 --- csharp/Facebook.CSSLayout/Native.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/csharp/Facebook.CSSLayout/Native.cs b/csharp/Facebook.CSSLayout/Native.cs index 61a88a4c..d037aed4 100644 --- a/csharp/Facebook.CSSLayout/Native.cs +++ b/csharp/Facebook.CSSLayout/Native.cs @@ -14,7 +14,11 @@ namespace Facebook.CSSLayout { internal static class Native { - private const string DllName = "CSSLayout.dll"; +#if UNITY_IOS && !UNITY_EDITOR + private const string DllName = "__Internal"; +#else + private const string DllName = "CSSLayout"; +#endif [DllImport(DllName)] public static extern IntPtr CSSNodeNew();