Moved call to libpd_add_to_search_path() to after libpd_init().
This commit is contained in:
parent
fd909fda75
commit
f5f3fd0e6a
1 changed files with 12 additions and 0 deletions
|
|
@ -117,6 +117,12 @@ public class LibPdInstance : MonoBehaviour {
|
|||
[DllImport("libpd")]
|
||||
private static extern int libpd_init();
|
||||
|
||||
[DllImport("libpd")]
|
||||
private static extern void libpd_clear_search_path();
|
||||
|
||||
[DllImport("libpd")]
|
||||
private static extern void libpd_add_to_search_path([In] [MarshalAs(UnmanagedType.LPStr)] string s);
|
||||
|
||||
[DllImport("libpd")]
|
||||
private static extern IntPtr libpd_new_instance();
|
||||
|
||||
|
|
@ -537,6 +543,12 @@ public class LibPdInstance : MonoBehaviour {
|
|||
}
|
||||
pdInitialised = true;
|
||||
|
||||
// Try and add the patch directory to libpd's search path for
|
||||
// loading externals (still can't seem to load externals when
|
||||
// running in Unity though).
|
||||
if(patchDir != String.Empty)
|
||||
libpd_add_to_search_path(Application.dataPath + patchDir);
|
||||
|
||||
// Make sure our static pipePrintToConsole variable is set
|
||||
// correctly.
|
||||
pipePrintToConsoleStatic = pipePrintToConsole;
|
||||
|
|
|
|||
Loading…
Reference in a new issue