Hi,
I am looking for a way to turn on Bluetooth on Android and iOS devices from inside my unity application or to trigger a prompt to ask the user for this (like in the example img).
Does anyone know of an asset, that can help me with this or if Unity has this feature already?
![alt text][1]
[1]: /storage/temp/99431-2017-08-03-145020.png
Help will be greatly appreciated!
Kind regards,
Rasmus Lindholm
↧
How to turn on Bluetooth from inside Unity?
↧
Using .framework for iOS as Plugin.
Hello.
I have built my plugin for Windows, Linux, Mac OSX and Android (dll, so, bundle, so) and the only thing I am having problems with is the iOS plugin (.framework). I have placed it in the appropriate folder inside Unity, iOS is ticked but when simulator starts I get 'missing image error' and errors in general related to no being able to load the library. Plugin is C++ only.
Any ideas? I have spent a few hours searching over the internet but nothing.
↧
↧
unity 5.6.3 play-service aar moving file error
![alt text][1]
[1]: /storage/temp/100194-ps.jpg
actually there is no corresponding file named classes.jar existed in play-services-11.0.4.aar!
↧
How to implement Authorize.net Native plugin in Unity?
Hi all,
I have tried building a native plugin in android using authorize.net API for my app's in app purchase. The problem is that I am able to receive the error response from Authorize.net server when form details are wrong. But when every form detail seems to be right, the positive response is not appearing on my screen. I am not able to get any positive response and the waiting animation keeps playing.
PS : I am using Sandbox account for testing.
This is the error on my logcat :-
W/ActivityManager( 595): Unable to start service Intent { act=net.authorize.act
ion.ENCRYPT cmp=com.keeves.gachaapp/net.authorize.acceptsdk.network.AcceptServic
e (has extras) } U=0: not found
↧
How to integrate a authorize.net android plugin in Unity?
Hey All,
**I am trying to integrate a native plugin which is made in android studio. I have unzipped the .aar file for the following :**
1. Copied the classes.jar file in Assets\Plugins\Android folder.
2. Copied the res folder in Assets\Plugins\Android folder.
3. Copied the Manifest under Assets\Plugins\Android\Manifest folder since I have other Manifest files in Assets\Plugins\Android.
**This is a the screen:**
![alt text][1]
###**The problem with my app is that it is Crashing at the time of clicking the Get Token button.**
This is the logcat I am getting: -
>08-21 11:29:36.376 11579 11579 E AndroidRuntime: java.lang.Error: FATAL EXCEPTION [main]>08-21 11:29:36.376 11579 11579 E AndroidRuntime: Unity version : 5.6.2f1>08-21 11:29:36.376 11579 11579 E AndroidRuntime: Device model : motorola XT1068>08-21 11:29:36.376 11579 11579 E AndroidRuntime: Device fingerprint: motorola/titan_retaildsds/titan_umtsds:6.0/MPB24.65-34-3/3:user/release-keys>08-21 11:29:36.376 11579 11579 E AndroidRuntime:>08-21 11:29:36.376 11579 11579 E AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lnet/authorize/acceptsdk/AcceptSDKApiClient$Builder;>08-21 11:29:36.376 11579 11579 E AndroidRuntime: at net.authorize.acceptsdk.sampleapp.AndroidBridge$1$2$2.onClick(AndroidBridge.java:129)>08-21 11:29:36.376 11579 11579 E AndroidRuntime: at android.view.View.performClick(View.java:5201)>08-21 11:29:36.376 11579 11579 E AndroidRuntime: at android.view.View$PerformClick.run(View.java:21163)>08-21 11:29:36.376 11579 11579 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:746)>08-21 11:29:36.376 11579 11579 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:95)>08-21 11:29:36.376 11579 11579 E AndroidRuntime: at android.os.Looper.loop(Looper.java:148)>08-21 11:29:36.376 11579 11579 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5443)>08-21 11:29:36.376 11579 11579 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)>08-21 11:29:36.376 11579 11579 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)>08-21 11:29:36.376 11579 11579 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)>08-21 11:29:36.376 11579 11579 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "net.authorize.acceptsdk.AcceptSDKApiClient$Builder" on path: DexPathList[[zip file "/data/app/com.keeves.gachaapp-1/base.apk"],nativeLibraryDirectories=[/data/app/#######-1/lib/arm, /data/app/#######/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]>08-21 11:29:36.376 11579 11579 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)>08-21 11:29:36.376 11579 11579 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:511)>08-21 11:29:36.376 11579 11579 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:469)>08-21 11:29:36.376 11579 11579 E AndroidRuntime: ... 10 more>08-21 11:29:36.376 11579 11579 E AndroidRuntime: Suppressed: java.lang.ClassNotFoundException: net.authorize.acceptsdk.AcceptSDKApiClient$Builder>08-21 11:29:36.376 11579 11579 E AndroidRuntime: at java.lang.Class.classForName(Native Method)>08-21 11:29:36.376 11579 11579 E AndroidRuntime: at java.lang.BootClassLoader.findClass(ClassLoader.java:781)>08-21 11:29:36.376 11579 11579 E AndroidRuntime: at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)>08-21 11:29:36.376 11579 11579 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:504)>08-21 11:29:36.376 11579 11579 E AndroidRuntime: ... 11 more>08-21 11:29:36.376 11579 11579 E AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available>08-21 11:29:36.431 1801 2957 W ActivityManager: Force finishing activity #######/com.unity3d.player.UnityPlayerActivity
**I've also tried copying the whole .aar release file but it did not work. There were no errors, also no activity appeared.**
[1]: /storage/temp/100296-capture.png
Thanks.
↧
↧
Unity 2017.1 .NET 4.6 Plugin - System.Runtime assembly not allowed to be included?
I am using a plugin compiled for .NET 4.6, which depends on [System.ValueTuple][1]. I'm using version 4.3.0 of this package. Everything works ok in the editor, but when I attempt to build for Windows or Mac OS X I get the following error. Could anybody shed some light on what the issue is here?
ArgumentException: The Assembly System.Runtime is referenced by System.ValueTuple ('Assets/Plugins/System.ValueTuple.dll'). But the dll is not allowed to be included or could not be found.
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2[TKey,TValue] cache, UnityEditor.BuildTarget target) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:142)
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2[TKey,TValue] cache, UnityEditor.BuildTarget target) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:148)
UnityEditor.AssemblyHelper.AddReferencedAssembliesRecurse (System.String assemblyPath, System.Collections.Generic.List`1[T] alreadyFoundAssemblies, System.String[] allAssemblyPaths, System.String[] foldersToSearch, System.Collections.Generic.Dictionary`2[TKey,TValue] cache, UnityEditor.BuildTarget target) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:148)
UnityEditor.AssemblyHelper.FindAssembliesReferencedBy (System.String[] paths, System.String[] foldersToSearch, UnityEditor.BuildTarget target) (at /Users/builduser/buildslave/unity/build/Editor/Mono/AssemblyHelper.cs:179)
UnityEditor.HostView:OnGUI()
**Additional details:** I'm experimenting with running a tensorflow neural network from within Unity. I'm using the rather nice TensorFlowSharp wrapper to do it. However, the wrapper targets 4.6.1 so I have retargeted for 4.6 (fork available [here][2]). If I can't get this to work, I'll have to write my own native calls which will be a pain.
[1]: https://www.nuget.org/packages/System.ValueTuple/4.3.0
[2]: https://github.com/mikeoconnor0308/TensorFlowSharp
↧
Linux build is putting libNative.so in wrong place
I am new to this Unity world, so I might be doing something wrong...
But, I am getting a DllNotFoundException for my Linux build. The Windows and MacOS build work fine, so it is not my managed code. The Linux library works fine in other .NET apps, so it is not that. And finally, when I look at the error message and move my native library to the location it is looking in, the game works.
Basically, this is a simple game that creates a 2D texture using SkiaSharp. My p/invoke looks like this (SKColorType is an enumeration):
[DllImport("libSkiaSharp", CallingConvention = CallingConvention.Cdecl)]
public extern static SKColorType sk_colortype_get_default_8888();
I have all of this on GitHub: https://github.com/mattleibow/SkiaSharpUnityDemo
The log files:
- console log: https://gist.github.com/mattleibow/b6e95312ada816496cd8afbcae36f8b1
- player log: https://gist.github.com/mattleibow/3f76cef131cf71abe8ca47d109806580
SkiaSharp: https://github.com/mono/SkiaSharp
This may be related to my question: http://answers.unity3d.com/questions/1394446/dllnotfoundexception-on-linux-2.html
↧
C++ native plugin Failed with error '%1 is not a valid Win32 application
Hello,
I have been trying to get a native plugin written in C++ to work in Unity.
This is my first time writing such a plugin, so I was playing around with some test code to see if I could get it working.
However, I am running into an issue I can't wrap my head around.
Unity reports an error with the use of my plugin whenever I use a C++ style convention, like new (I have no experience writing code in C, so apologies if that statement is not true).
Below is the C++ code I am using:
#define UNITY_EXPORT __declspec(dllexport)
int value = 0;
class AA {
public:
int index;
};
static AA* aaa = 0;
static void DoInit(){
aaa = new AA();
}
extern "C" {
UNITY_EXPORT void A(int x){
value = x;
}
UNITY_EXPORT int B(){
return value;
}
UNITY_EXPORT void Init(){
DoInit();
}
}
And this is the MonoBehaviour script:
public class TestDLL : MonoBehaviour {
[DllImport("libUnitySimpleTest", EntryPoint="A")]
public static extern void A(int x);
[DllImport("libUnitySimpleTest", EntryPoint="B")]
public static extern int B();
[DllImport("libUnitySimpleTest", EntryPoint="Init")]
public static extern void Init();
// Use this for initialization
void Start () {
Init ();
}
// Update is called once per frame
void Update () {
A (2);
int r = B ();
transform.position = new Vector3 (r, 0.5f, 0);
}
}
The error message is: "Failed to load 'Assets/Plugin/[pluginname].dll' with error '%1 is not a valid Win32 application.
After a lot of trial and error, I figured out that this error happens when I do the "aaa = new AA();" call. If I comment this line, it works fine. Likewise, if I try to for example create a char* array using the new keyword, the error appears, but creating the array using malloc() works fine.
Any idea why this happens or how I can fix it?
If it matters, I am not using the Pro version of Unity.
Thanks in advance.
Yme
↧
How to place UI over native iOS view?
I created a native iOS plugin which creates a new UIView and adds it to main window. My canvas with all UI elements is covered by this new UIView and I need the canvas to be in front of it. How to achieve this? Thanks.
UPD: I can put iOS view above or under the Unity view. However, I'd like newly created iOS view to be visible under Unity view. Now it seems that Unity view clears everything behind it. Setting camera clear flags to Don't clear doesn't help.
↧
↧
how to open Add To Contact with unity?
i checked some post where there is some trick to open dial pad directly with
Application.Openurl(tel:[555555555]);
to send sms:
Application.Openurl(string.Format("sms:{0}?body={1}",mobile_num,message));
same way how to do for AddContact if i pass name and number it should open Add To contact page of android that have name and number filled in it
↧
Plugin external method every frame
Hey,
I'm calling an external method following https://docs.unity3d.com/Manual/NativePlugins.html every frame on Update (). The problem is, the native position update is not in Sync with the underlying Unity rendering. It looks like the hotspots are stuttering because they are one or more frames behind. Is that expected? Is there any way to call it synced not asynced?
[DllImport ("__Internal")]
private static extern void nativeViewUpdateHotspot(string name, float x, float y);
-
extern "C" {
void nativeViewUpdateHotspot(const char* name, float x, float y, float percentage, float direction, float distance) {
…
[hotspotsViewController updateHotspot:[NSString stringWithUTF8String:name]
x:CGFloat(x)
y:CGFloat(y)
];
}
}
↧
Native Plugin Cleanup
I'm writing a native plugin for Windows in C++ and having some trouble with the development process. Because Unity doesn't release the plugin dll after running it once, it is necessary to close Unity before I can modify the dll. This is obviously not ideal, so as a work around I [manually load and release](http://runningdimensions.com/blog/?p=5) the dll in a script at runtime. This works for simple plugins, but for plugins that hook into Unity's rendering system I've been finding that calling `FreeLibrary` from `OnApplicationQuit` isn't safe because the OpenGL thread might continue running afterwards. For instance, if I call glDebugMessageCallback(), and I unload the library, the callback function is no longer valid. I can't unregister this callback in OnApplicationQuit because I need to be on the rendering thread to do so.
Here is the stack trace:
> 00007fff914403f0() <- Missing function
nvoglv64.dll!0000000072b40617()
nvoglv64.dll!000000007290feec()
Unity.exe!GfxDeviceGLES::BeginProfileEvent(class ProfilerInformation *)
Unity.exe!GfxDeviceWorker::RunCommand(class ThreadedStreamBuffer &)
So my problem basically boils down to: where should I free my dll if not in `OnApplicationQuit`?
↧
Are native plugins only supported on Unity Pro?
I know this was the case previously but I read somewhere that since Unity 5.x native plugins are supported in all versions.
↧
↧
Editor crash "allocation 0x0xc000000000000000 already registered"
I am trying to integrate [libfreenect2][1] and [freenect2.net wrapper][2] but I am getting a strange crash that only happens in the Linux editor for my main project. The Windows editor, and Windows and Linux standalone all work fine. I am using editor version 2017.2.0f3. The crash happens almost instantly after I call `device = new Device(0);` to initialize the Kinect device. There is an error in the console, then the editor itself closes.
I tried copying just the code that interacts with the Kinect to a new project, and it worked there. How can I find the cause of the crash? Or am I stuck copying pieces one at a time to a new project until it starts crashing?
Relevant bits of scripts:
//KinectManager2.cs
void Start () {
depthSources = GetComponents();
Array.Sort(depthSources, delegate (DepthSourceBase a, DepthSourceBase b) { return a.Priority.CompareTo(b.Priority); });
foreach (DepthSourceBase source in depthSources)
{
if (source.enabled && source.InitDepthSource())
{
activeDepthSource = source;
break;
}
}
}
//KinectTwoDepthSource.cs
public override bool InitDepthSource()
{
try
{
if (Device.Count > 0)
{
device = new Device(0);
foundKinect = true;
Width = device.DepthFrameSize.Width;
Height = device.DepthFrameSize.Height;
raw = new float[Width * Height];
averageDepth = new float[Width * Height];
averageDepthCount = new int[Width * Height];
for (int i = 0; i < depthBuffer.Length; i++)
{
depthBuffer[i] = new float[Width * Height];
for (int j = 0; j < depthBuffer[i].Length; j++)
{
depthBuffer[i][j] = float.NaN;
}
}
device.FrameReceived += Handle_KinectTwo_DataReceived;
return true;
}
}
catch (DllNotFoundException) { }
return false;
}
Here is the Editor.log from right before initializing the device. I'm not sure why it is complaining about the .so files, since they are all in `Assets/Plugins/Libfreenect2/Linux` and it must find them if it gets past `if (Device.Count > 0)`
Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/Libfreenect2/Linux/libfreenect2c.so
Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/Libfreenect2/Linux/libfreenect2c.so
Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/Libfreenect2/Linux/libfreenect2c.so
Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/Libfreenect2/Linux/libfreenect2c.so
/home/builduser/buildslave/unity/build/Editor/Platform/Linux/UndoPlatformDependent.cpp:SetUndoMenuNamePlatformDependent
[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 14 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @4:13 with serial 006147365347
[Info] [Freenect2Impl] found 1 devices
Found device
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:Log(LogType, Object)
UnityEngine.Debug:Log(Object)
KinectTwoDepthSource:InitDepthSource() (at Assets/Script/Kinect/KinectTwoDepthSource.cs:85)
KinectManager2:Start() (at Assets/Script/Kinect/KinectManager2.cs:30)
(Filename: Assets/Script/Kinect/KinectTwoDepthSource.cs Line: 85)
Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/Libfreenect2/Linux/libfreenect2c.so
Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/Libfreenect2/Linux/libfreenect2c.so
Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/Libfreenect2/Linux/libfreenect2c.so
Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/Libfreenect2/Linux/libfreenect2c.so
[Info] [Freenect2DeviceImpl] opening...
[Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 20*16384 ir: 60*8*33792
[Info] [Freenect2DeviceImpl] opened
Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/x86_64/libfreenect.so
Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/x86_64/libfreenect.so
Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/x86_64/libfreenect.so
Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/x86_64/libfreenect.so
Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/x86_64/libfreenect.so
Fallback handler could not load library /home/adminz/Downloads/unity-editor-2017.2.0f3/Editor/Data/Mono/lib/libAssets/Plugins/x86_64/libfreenect.so
The specified identifier (BoxDimensions) does not exists. please use Exists () to check for existent before calling Load.
returning the default(T) instance.
UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
UnityEngine.Logger:LogFormat(LogType, String, Object[])
UnityEngine.Debug:LogWarningFormat(String, Object[])
BayatGames.SaveGameFree.SaveGame:Load(String, String, Boolean, String, ISaveGameSerializer, ISaveGameEncoder, Encoding, SaveGamePath) (at Assets/BayatGames/SaveGameFree/Scripts/SaveGame.cs:624)
BayatGames.SaveGameFree.SaveGame:Load(String, String) (at Assets/BayatGames/SaveGameFree/Scripts/SaveGame.cs:439)
CalibrationManager:Start() (at Assets/Script/Calibration/CalibrationManager.cs:146)
(Filename: Assets/BayatGames/SaveGameFree/Scripts/SaveGame.cs Line: 624)
InvalidCastException: Specified cast is not valid.
at CalibrationManager.InitTextureDisplay () [0x000d6] in /home/adminz/AR-Sandbox-master/Assets/Script/Calibration/CalibrationManager.cs:256
at CalibrationManager.Start () [0x00653] in /home/adminz/AR-Sandbox-master/Assets/Script/Calibration/CalibrationManager.cs:233
(Filename: Assets/Script/Calibration/CalibrationManager.cs Line: 256)
allocation 0x0xc000000000000000 already registered @ /home/builduser/buildslave/unity/build/Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:l234 size 24000; now calling from /home/builduser/buildslave/unity/build/Runtime/GfxDevice/opengles/DataBuffersGLES.cpp:l234 size 3000?
(Filename: /home/builduser/buildslave/unity/build/Runtime/Allocator/MemoryManager.cpp Line: 1464)
Receiving unhandled NULL exception
#0 0x007fb6d22aeac0 in funlockfile
#1 0x007ffeb1f58920 in _nv042glcore
#2 0x007ffeb1f58960 in _nv042glcore
#3 0x007ffeb1f58a70 in _nv023glcore
#4 0x007ffeb1f58ab0 in GfxDeviceGLES::DrawBufferRanges(GfxBuffer*, VertexStreamSource const*, int, DrawBuffersRange const*, int, VertexDeclaration*, ShaderChannelMask, unsigned long, bool)
#5 0x007ffeb1f58b80 in GfxDeviceGLES::DrawBuffers(GfxBuffer*, VertexStreamSource const*, int, DrawBuffersRange const*, int, VertexDeclaration*, ShaderChannelMask)
#6 0x007ffeb1f58c00 in UI::Canvas::DrawRawMesh(UI::Batch&, GfxBuffer*, GfxBuffer*)
#7 0x007ffeb1f58c90 in UI::Canvas::RenderOverlays()
#8 0x007ffeb1f58ce0 in UI::CanvasManager::RenderOverlays(int)
#9 0x007ffeb1f58d30 in RepaintController::RenderGameViewCameras(RenderTexture*, int, RectT const&, Vector2f const&, bool)
#10 0x007ffeb1f58e30 in EditorGUIUtility_CUSTOM_INTERNAL_CALL_RenderGameViewCamerasInternal(MonoObject*, int, RectT const&, Vector2fIcall const&, unsigned char)
#11 0x007ffeb1f58e90 in (Unknown)
#12 0x007ffeb1f58ea0 in (Unknown)
#13 0x007ffeb1f58eb0 in mono_get_jit_info_from_method
#14 0x007ffeb1f597c0 in mono_g_hash_table_print_stats
#15 0x007ffeb1f597f0 in mono_runtime_run_main
#16 0x007ffeb1f598a0 in mono_unity_register_path_remapper
#17 0x007ffeb1f59970 in (Unknown)
#18 0x007ffeb1f59980 in (Unknown)
#19 0x007ffeb1f59990 in (Unknown)
Launching bug reporter
[Unity Package Manager (Upm)] - Application terminated due to HTTP connection being closed on the other end.
[1]: https://github.com/OpenKinect/libfreenect2
[2]: https://github.com/thomiel/freenect2.net
↧
Audio Spatializer Plugin SDK: how can plugin get channel count of input audio source?
Hello Unity friends!
I am working on a Spatializer plugin and my plugin DSP code and I understand that Unity passes audio to my plugin as stereo, regardless of whether the underlying audio Clip is mono, stereo or multi-channel, by up or down-mixing as necessary.
So given that my plugin will always "see" audio as stereo, how can I access per instance (i.e. per audio source) info on e.g. channel count of the source. The documentation on spatializer instance data includes the following:
struct UnityAudioSpatializerData
{
float listenermatrix[16]; // Matrix that transforms sourcepos into the local space of the listener
float sourcematrix[16]; // Transform matrix of audio source
float spatialblend; // Distance-controlled spatial blend
float reverbzonemix; // Reverb zone mix level parameter (and curve) on audio source
float spread; // Spread parameter of the audio source (0..360 degrees)
float stereopan; // Stereo panning parameter of the audio source (-1: fully left, 1: fully right)
// The spatializer plugin may override the distance attenuation in order to
// influence the voice prioritization (leave this callback as NULL to use the
// built-in audio source attenuation curve)
UnityAudioEffect_DistanceAttenuationCallback distanceattenuationcallback;
};
I would have thought that a channel count in this struct would be useful. So is there a way to infer the mono/stereo/multi channel nature of the audio source from the above? (e.g. maybe stereopan is set to a specific value for mono sources?) It seems I must be missing something here because it's clear that a spatializer would want to spatialize an audio source differently depending on its number of channels.
Thanks!
↧
Native DLL saying FileNotFoundException
I'm trying to use the C# library clrzmq which is a library for ZeroMQ messaging. There's a .NET specific one but I'm unable to get it to work in Unity 2017.
My script for clrzmq works fine in standalone Visual Studio 2017. I put it into Unity and once I run it I get
FileNotFoundException: UnmanagedLibrary[libzmq] Unable to load binary "libzmq" from folders
C:\Program Files\Unity\Editor\amd64\libzmq.dll
C:\Program Files\Unity\Editor\x64\libzmq.dll
C:\Unity Projects\unity\Assets\ZeroMQ\amd64\libzmq.dll
C:\Unity Projects\unity\Assets\ZeroMQ\x64\libzmq.dll
I've tried copying the file to a number of those other folders. Same error. I put it under Assets, Assets/Plugins and even the Unity editor folder. No dice on any of them.
Ideas?
↧
Are calls to C++ DLL handled asynchronously?
Hi everyone,
When I call an imported function (from a C++ DLL), will Unity stall until the function finishes executing, or will it still run asynchronously? The dll does some extensive computing that takes 30-100ms, and I don't want the program to lag during that time.
Thanks in advance!
↧
↧
How to Control iOS device volume with Unity?
I developed Enterprise App, and installed it to my iPad. the problem is that the iPad will be built in the wall, so it will not be possible to control volume button. I want to control the volume button during the exhibition. I made UIButton "-" and "+" to control the volume of the device instead of real volume button, not the Unity audio component's volume. I researched several times, so know what to do in Unity.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.Runtime.InteropServices;
public class IOSManager : MonoBehaviour {
public static IOSManager _instance;
[DllImport("__Internal")]
private static extern void iosVolumeMinus();
private static extern void iosVolumePlus();
void Awake(){
_instance = this;
}
public void CallMinusFunc()
{
iosVolumeMinus();
}
public void CallPlusFunc()
{
iosVolumePlus();
}
}
Well, I tried somethings and realized that MPMusicPlayerController And MPVolumeView may work, but had some problems.
![alt text][1]
If I use MPMusicPlayerController, alert : 'volume' is deprecated: first deprecated in iOS 7.0 - Use MPVolumeView for volume control.
If I use MPVolumeView, alert : Incomplete definition of type 'struct objc_class'.
It is my first time to develop iOS app, so I don't know what is the problem. please help me..
[1]: /storage/temp/110297-captured.png
↧
Build Linux plugin with a PC
https://github.com/unity3d-jp/FrameCapturer
For some reason, i need to compile a Linux Unity build with this plugin and run it on AWS. The plugin part says it can work in Linux but it need me to compile it myself. But the problem is, i have experience on linux. I only develop with PC and Mac, and i don't build plugin myself. So how should i start?
↧
How unity works with native Mobile applications?
Hi,
I am working on a native mobile application.I have one functionality in my app deals with a lot of animations.Its a dynamic character movement according to inputs.In my thoughts, unity might be better option to do this.but none of the other features in my app needs unity .those are easy to do with native functionalities of iOS and Android and hard to do with unity.Can anyone suggest how can I implement unity in my app just for one functionality? do unity has some plugin that works with native applications.
Any help will be appreciated!
Thanks,
Anu
↧