Questions tagged [android-unity-plugin]

65 questions
1
vote
0 answers

Save Network Dialog Missing "Cancel" and "Save" Options

I am building an android plugin for Unity that saves wifi networks to the device. I am using the ACTION_WIFI_ADD_NETWORKS intent and it seems to be working fine. I've exported the library as an aar file, imported it into my unity project, and added…
1
vote
0 answers

Drawable resource not visible while using aar plugin in unity

Here is sample dialog I am showing in unity, In that Icon not visible. contain of dilaog are comming from aar. Image at leftside is sample from android app and rightside is from unity.
earthling
  • 147
  • 16
1
vote
0 answers

Unity AndroidJavaObject pass float array as out parameter

I have this Java Method public class Test { double calculate(float[] array){ array[0] = 2.0f; return 3.0f; } } I integrated this Java Method via an Android Archive into Unity. I access this method like this: var javaObject = new…
Soccertrash
  • 1,830
  • 3
  • 28
  • 48
1
vote
1 answer

Using flutter_unity_widget and create a plugin with my unity project

I would like to use flutter_unity_widget in order to embed my unity project and use it as a plugin in apps. I followed this link: https://pub.dev/packages/flutter_unity_widget but it isn't compiled as: * Where: Build file…
Erez git
  • 73
  • 8
1
vote
0 answers

How to dynamically add stickers in the whatsapp-sticker pack [Android][Unity-Android plugin]?

I have used the repo to make an android plugin for my unity game, wherein I reward the player with some stickers at each level. So basically Im successful in calling the add sticker function from the android plugin and can add the sticker pack…
1
vote
0 answers

How to make a connection of Unity player prefs and Android sharedPreferences?

Im using Unity android where i have used a native android plugin, I want to pass a json file to and from unity and Android plugin. I was previously using string contents = (File.ReadAllText(Application.persistentDataPath + "/contents.json")); in…
1
vote
1 answer

Making a Unity Android Native Media Player plugin

I'm Making a native android mediaplayer plugin for unity,everything works fine,the plugin is loading correctly and the parameters are passing correctly to the plugin,even the player starts,but it seems that nothing is playing , no sounds come…
1
vote
1 answer

Runtime Error with Unity Plugins (startActivity from outside of an Activity..)

I'm implementing two plugins in my unity project. First plugin is a live wallpaper which contain the main activity. The second plugin is a native sharing. What I did is I got the context reference from the first plugin which contain the main…
1
vote
0 answers

Unity export does not work with android after unity version is upgraded

Old Unity version: 2018.1.6f1 New Unity Version : 2019 versions I am working on an unity android project and everything is working fine. I recently generated exports from latest unity versions of 2019 but it does not work. I get ResourceNotFound…
1
vote
1 answer

Unity Plugin that contains androidx library functions

I created an Android plugin for unity to handle some native jobs and it works fine on my device, until I wanted to add "WorkManager" class to handle some background jobs and I received following…
Bardia
  • 155
  • 1
  • 2
  • 13
1
vote
1 answer

Import Unity Scene in UnityPlayer(Android/iOS) Cardboard and DayDream

I have multiple scene in my project and I don't want to embed all scene in apk because of size of application. I want to import the .unityproject or unity scene dynamically(download from internet) and render it in app. Is it possible ? Do we have…
1
vote
0 answers

View Order of Framelayout

Here is the sample code: FrameLayout Root = new FrameLayout(this); this.addContentView(Root, LayoutParam0); setContentView(this); GLSurfaceView gls = new GLSurfaceView(this); Root.addView(gls,0, LayoutParam1); View view = new…
1
vote
0 answers

Unity Android Plugin & opencv linking using ndk toolchain

I'm trying to write a unity plugin for android (eventually also on IOS) that uses opencv. I managed to get a normal helloworld.cpp compiled to a shared library using Android NDK Toolchain to arm7 architecture, I also do the same for x86, and…
1
vote
0 answers

UnityPlayer.UnitySendMessage not working from a non-UnityPlayerActivity

Similar to this Stack Overflow question, I'm Building a Plugin for Android which starts a non-UnityPlayer Activity. The issue that I am running into is that UnityPlayer.UnitySendMessage does not send any messages to Unity until the Activity finishes…
lgdroid57
  • 699
  • 14
  • 29
1
vote
1 answer

Unity ignores android plugin manifest file leading to missing element in its android manifest

I have created an Android plugin for Unity3D. This plugin starts a background service by calling bindService(). To declare this service, I have put the element as a child of the element in the AndroidManifest.xml file of my…