Hello!
----------
I'm working on a project reliant on ImageMagick.Net. The stable build works in Unity 2019.1.10, under the .Net 4.x runtime environment and api compatability level, using Mono scripting backend. It uses ImageMagick 7.14.1 installed via nuget, using the netstandard20 lib dlls, and runtime native binaries. For the Mac native binary to work, the file extension must be changed from .dylib to .bundle.
----------
ImageMagick 7.14.1 HDRI any cpu works great in 2019.1 (any version) but upon upgrading to Unity 2019.2 or 2019.3, I always get a DllNotFoundException on the mac binary (Magick.Native-Q16-HDRIx64.dll).
----------
From the release notes I believe the issue has to do with the added support for .dylib files. The Mac binary that cannot be found has to be changed from Magick.Native-Q16-HDRIx64.dll.dylib to Magick.Native-Q16-HDRIx64.dll.bundle to work in 2019.1. Other than that I couldn't find a release note that appeared related.
----------
I've tried various upgrades, as well as using Magick.Native-Q8 as well. Again, this works in Unity 2019.1.x but fails with 2019.2 and beyond. It's worth noting that the Image Magick dlls continually work on Windows, which is why I suspect this is a Unity OSX bug with dylib changes.
----------
Any idea on what would trip up the dll in general migrating to 2019.2+? Or any updated guides for Mac on using Image Magick?
----------
To save some time I made a simple git repo demonstrating my problem. I'll provide additional notes in the readme to replicate, but the goal is to be able to succesfully open the master branch in 2019.3 (or 2019.2).
----------
https://github.com/jlankitus/ImageMagickTest
↧
DllNotFoundException when upgrading from Unity 2019.1
↧
How to resolve "Multiple Precompiled Assemblies" error
Our project is currently attempting to use DOTS and Grpc, but we are running into some conflicts with the dlls. It appears that the `com.unity.collections@0.5.1-preview.11` package includes System.Runtime.CompilerServices.Unsafe.dll, which the Grpc plugin also includes, but at a slightly higher version (4.0.4.1 instead of 4.0.4.0). Since there are now 2 dlls of the same name in the project, this results in this error:> PrecompiledAssemblyException: Multiple precompiled assemblies with the same name System.Runtime.CompilerServices.Unsafe.dll included for the current platform. Only one assembly with the same name is allowed per platform.
If I delete the unsafe dll in the Grpc plugin, the error goes away but Grpc throws an exception at runtime because it can't find the correct version of the dll. Grpc references this dll indirectly through the System.Memory.dll, so as far as I can tell, the only way I can change the version of that dll to match is to recompile Grpc and System.Memory. It doesn't look like there's any way to modify the collections package.
Is there a better way to handle conflicting dlls in Unity? Normal C# apps could use bindingRedirects but those don't seem to be supported.
↧
↧
How to implement Emscripten linking support for WebGl build?
In my web app I have upload and download methods that pull from an MS Azure server storage blob. Downloading information works fine since I'm just using UnityWebRequests. Unfortunately, to upload to Azure storage you must use Azure's API for storage manipulation so I've imported the proper libs for that. When it comes to uploading data to the server while running the web app in the browser I run into the error found at the end of the post.
I've looked for answers to find a work-around but haven't found any solutions that work and many seem to work (and I cannot remove any async functions/threading tasks).
How would I implement Emscripten's linking support into my project? Step-by-step instructions would be nice!
Invoking error handler due to
Uncaught abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at Error
at jsStackTrace (SMTC CGC Beta2.wasm.framework.unityweb:8:22295)
at stackTrace [Object.stackTrace] (SMTC CGC Beta2.wasm.framework.unityweb:8:22466)
at Object.onAbort (https://smtc-cgc.azurewebsites.net/Build/UnityLoader.js:4:11047)
at abort (SMTC CGC Beta2.wasm.framework.unityweb:8:493247)
at _dlopen (SMTC CGC Beta2.wasm.framework.unityweb:8:177073)
at wasm-function[64565]:0x10b5127
at wasm-function[65841]:0x10ee465
at wasm-function[36719]:0xa6dbf6
at wasm-function[36718]:0xa6db70
at wasm-function[67107]:0x112ab33
at dynCall_iii [Object.dynCall_iii] (SMTC CGC Beta2.wasm.framework.unityweb:8:466052)
at invoke_iii (SMTC CGC Beta2.wasm.framework.unityweb:8:340263)
at wasm-function[36717]:0xa6d923
at wasm-function[67138]:0x112afbf
at dynCall_vi [Object.dynCall_vi] (SMTC CGC Beta2.wasm.framework.unityweb:8:479893)
at invoke_vi (SMTC CGC Beta2.wasm.framework.unityweb:8:366807)
at wasm-function[36715]:0xa6d796
at wasm-function[36714]:0xa6d6d5
at wasm-function[48545]:0xd2533e
at wasm-function[67101]:0x112aaa4
at dynCall_ii [Object.dynCall_ii] (SMTC CGC Beta2.wasm.framework.unityweb:8:464651)
at invoke_ii (SMTC CGC Beta2.wasm.framework.unityweb:8:337710)
at wasm-function[48547]:0xd25481
at wasm-function[67101]:0x112aaa4
at dynCall_ii [Object.dynCall_ii] (SMTC CGC Beta2.wasm.framework.unityweb:8:464651)
at invoke_ii (SMTC CGC Beta2.wasm.framework.unityweb:8:337710)
at wasm-function[36755]:0xa6f261
at wasm-function[45504]:0xc731b5
at wasm-function[35699]:0xa3fb90
at wasm-function[19875]:0x6818eb
at wasm-function[67111]:0x112ab9b
at dynCall_iiii [Object.dynCall_iiii] (SMTC CGC Beta2.wasm.framework.unityweb:8:467117)
at invoke_iiii (SMTC CGC Beta2.wasm.framework.unityweb:8:342215)
at wasm-function[35714]:0xa40d3d
at wasm-function[67142]:0x112b01a
at dynCall_vii [Object.dynCall_vii] (SMTC CGC Beta2.wasm.framework.unityweb:8:482002)
at invoke_vii (SMTC CGC Beta2.wasm.framework.unityweb:8:370532)
at wasm-function[27372]:0x8161d9
at wasm-function[35710]:0xa409fa
at wasm-function[24026]:0x741f07
at wasm-function[24031]:0x742581
at wasm-function[24023]:0x741cd1
at wasm-function[24021]:0x741b99
at wasm-function[24038]:0x742a23
at wasm-function[35686]:0xa3edc6
at wasm-function[35685]:0xa3ed88
at wasm-function[67113]:0x112abd1
at dynCall_iiiii [Object.dynCall_iiiii] (SMTC CGC Beta2.wasm.framework.unityweb:8:467849)
at invoke_iiiii (SMTC CGC Beta2.wasm.framework.unityweb:8:343574)
at wasm-function[35687]:0xa3f08a
1bc730cc-0b8a-466b-a427-63f8e4de01cb:8 Uncaught abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at Error
at jsStackTrace (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:22295)
at Object.stackTrace (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:22466)
at Object.onAbort (https://smtc-cgc.azurewebsites.net/Build/UnityLoader.js:4:11047)
at abort (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:493247)
at _dlopen (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:177073)
at wasm-function[64565]:0x10b5127
at wasm-function[65841]:0x10ee465
at wasm-function[36719]:0xa6dbf6
at wasm-function[36718]:0xa6db70
at wasm-function[67107]:0x112ab33
at Object.dynCall_iii (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:466052)
at invoke_iii (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:340263)
at wasm-function[36717]:0xa6d923
at wasm-function[67138]:0x112afbf
at Object.dynCall_vi (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:479893)
at invoke_vi (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:366807)
at wasm-function[36715]:0xa6d796
at wasm-function[36714]:0xa6d6d5
at wasm-function[48545]:0xd2533e
at wasm-function[67101]:0x112aaa4
at Object.dynCall_ii (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:464651)
at invoke_ii (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:337710)
at wasm-function[48547]:0xd25481
at wasm-function[67101]:0x112aaa4
at Object.dynCall_ii (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:464651)
at invoke_ii (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:337710)
at wasm-function[36755]:0xa6f261
at wasm-function[45504]:0xc731b5
at wasm-function[35699]:0xa3fb90
at wasm-function[19875]:0x6818eb
at wasm-function[67111]:0x112ab9b
at Object.dynCall_iiii (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:467117)
at invoke_iiii (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:342215)
at wasm-function[35714]:0xa40d3d
at wasm-function[67142]:0x112b01a
at Object.dynCall_vii (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:482002)
at invoke_vii (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:370532)
at wasm-function[27372]:0x8161d9
at wasm-function[35710]:0xa409fa
at wasm-function[24026]:0x741f07
at wasm-function[24031]:0x742581
at wasm-function[24023]:0x741cd1
at wasm-function[24021]:0x741b99
at wasm-function[24038]:0x742a23
at wasm-function[35686]:0xa3edc6
at wasm-function[35685]:0xa3ed88
at wasm-function[67113]:0x112abd1
at Object.dynCall_iiiii (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:467849)
at invoke_iiiii (blob:https://smtc-cgc.azurewebsites.net/1bc730cc-0b8a-466b-a427-63f8e4de01cb:8:343574)
at wasm-function[35687]:0xa3f08a
↧
Newtonsoft.Json.dll error when I try to build.
Hello,
when I tried to build the game on Universal Windows Platform (I am trying to make a build for xbox) I receive this error:
**Plugin 'Newtonsoft.Json.dll' is used from several locations:
Assets/Xbox Live/Libs/UWP/Newtonsoft.Json.dll would be copied to /Newtonsoft.Json.dll
Assets/Xbox Live/Tools/AssociationWizard/Newtonsoft.Json.dll would be copied to /Newtonsoft.Json.dll
Plugin 'XInputInterface.dll' is used from several locations:
Assets/XInputDotNet/Plugins/x86/XInputInterface.dll would be copied to /XInputInterface.dll
Assets/XInputDotNet/Plugins/x86_64/XInputInterface.dll would be copied to /XInputInterface.dll**
↧
Data transfer between another application and Unity
Hello everyone,
I created a flight simulator with Unity. The simulator that I created, gets GPS data from FlightGear flight simulator at run-time. In this way, I can simulate the movements of the flying aircraft in Flightgear with Unity.
I provide the data flow between these two simulators via sockets. But I want to create a middleware instead of this. Is there a way to communicate between middleware and Unity without using a socket?
↧
↧
Keep assemblies in separated dll instead of GameAssembly.dll
Hello team !
I'de like to use the assemblies not only to reduce the compile time of the script during development but also to reduce the initial load time of the application on console when the project becomes significantly bigger.
I expect to cut boot time of the application by starting a scene with the minimal unity dependencies to show a loader and asynchronously start loading the rest of the dlls and required first asset.
Is there a way I can compile the final application without all my assemblies dlls being merged into GameAssembly.dll ?
Regards JP
I'de like to use the assemblies not only to reduce the compile time of the script during development but also to reduce the initial load time of the application on console when the project becomes significantly bigger.
I expect to cut boot time of the application by starting a scene with the minimal unity dependencies to show a loader and asynchronously start loading the rest of the dlls and required first asset.
Is there a way I can compile the final application without all my assemblies dlls being merged into GameAssembly.dll ?
Regards JP
↧
Where are my project's dlls saved?
I'm looking for the dlls generated by Unity for my code so I can point my editor at them for autocompletion.
I use vim and a linting plugin for it called ale. It instructs you to [set a variable to your project's obj/Debug/ folder path][1]:
> This variable defines a list of> external assembly (*.dll) files> required by the mono mcs compiler to> generate a valid module target. The> list is passed the mcs compiler> using the `-r:` flag.>> For example:
" Compile C# programs with the Unity engine DLL file on Mac.
let g:ale_cs_mcsc_assemblies = [
\ '/Applications/Unity/Unity.app/Contents/Frameworks/Managed/UnityEngine.dll',
\ 'path-to-unityproject/obj/Debug',
\]
However, my when I checked out my Unity project onto a new computer, it does't have an obj/ folder next to my Assets/ folder.
I've tried Assets > Open C# project.
My `Assembly-CSharp.csproj` has a line that says `Temp\bin\Debug\ ` but my project's Temp folder only contains ProcessJobs, UnityLockfile, and two UnityTempFile-* files.
[1]: https://github.com/dense-analysis/ale/blob/e329413a31d6ef687ded4df1852e372ea6b21809/doc/ale-cs.txt#L75-L91
↧
create .dll file by c# scripting and read/write data in created file through c# scripting
Hi guys,
I want to ask, if its possible to create DLL file from .cs file, which can be read/write from c# script.
↧
Can not implicitly convert a unityEngine.GameObject from unityEngine.Coremodule.dll to unityEngine.GameObject from Unityengine.dll
hi, i am trying to make a .dll library in visual studio which i will later use in unity, i am making the library project as i will need to upload it as AssetBundle,
Now:
currentWorkingBlock = currentWorkingTexDraw.gameObject;
this line workes perfectly in unity project but when i am making the visual studio dll file this line gives the error :
Can not implicitly convert a UnityEngine.GameObject from UnityEngine.CoreModule.dll to UnityEngine.GameObject from UnityEngine.dll
can anybody tell me how unity is converting it internally,
or any other way through which i can download assets and scripts from the server into the apk at runtime and build the scene?
and,
currentWorkingTexDraw is a texDraw object, texDraw is an asset that we bought for representing mathematical values.
↧
↧
editor target cast fail on DLL
Editor.target cast works fine on the unity project, but on my external library dont.
Am I missing some assembly reference?
using UnityEngine;
using UnityEngine.UI;
using UnityEditor;
using UnityEditor.UI;
namespace HiddenClasses {
[CustomEditor(typeof(DropdownExpand), true), CanEditMultipleObjects]
public class DropdownExpandEditor : DropdownEditor {
private SerializedProperty maxItens;
protected override void OnEnable() {
base.OnEnable();
maxItens = serializedObject.FindProperty("maxItens");
}
public override void OnInspectorGUI() {
serializedObject.Update();
var maxi = maxItens.intValue;
MonoBehaviour b;
var num = (target as DropdownExpand).options.Count;
var size = (serializedObject.targetObject as DropdownExpand).itemText.transform.parent
.GetComponent().rect.height;
EditorGUILayout.LabelField("Itens: {0} Size: {1} Max Size: {2}".V(num, size, (maxi > 0 ? maxi : num) * size));
EditorGUILayout.PropertyField(maxItens);
serializedObject.ApplyModifiedProperties();
EditorGUILayout.Space();
//base.OnInspectorGUI();
}
}
}
Note the error says MonoBehavior doesnt exists but, a variable of that type is declared just a line before (for testing purpose)
![alt text][1]
[1]: /storage/temp/155332-cast-error.png
↧
How do I integrate our GUI project in Unity with our existing C++ project? DLL's and IL2CPP scripting backend solutions are not working...
I'll attempt to be as brief as possible. I have tried many documented solutions with no luck.
I am working with a team of students on a senior project. We have created a discrete event simulation project in C++ using Visual Studio 2019. The project consists of numerous classes and their respective header files. The project is able to be built and run as a console application.
We are using Unity to build a GUI for the project and I am attempting to call certain functions from the C++ project within the Unity project.
My first attempt was to build the C++ project as a DLL. I wrapped a function I wanted from the C++ code in an extern "C" block and added __declspec(dllexport) to the function definition
Example:
extern "C"{
__declspec(dllexport) void InputReader::AddSelectedObject(string name);
}
The dll build was successful and was named "DES.dll". I was able to see the "AddSelectedObject" in the dll file via notepad to verify that the C-style block was preventing the C++ compiler from encoding the function name. I added the dll to our Unity project under Assests/Plugins/. In the C# script that I want to make the C++ function call, I defined the function using:
[DllImport ("DES")]
private static extern void AddSelectedObject(string name);
I ran the Unity project and received an EntryPointNotFound exception when the line above was executed.
This led me on a massive goose chase for a solution via many Unity Answer, Stack Overflow, and other site discussion boards as well as many pages of the Unity API Manual.
I have tried switching the project to the IL2CPP scripting backend and using the .CPP files instead of a dll and attempted to call the function via
[DllImport ("__Internal")]
private static extern void AddSelectedObject(string name);
I attempted to use marshalling for the string variable
private static extern void AddSelectedObject([MarshalAs(UnmanagedType.LPWStr)]string name);
I attempted to switch the build in Unity to Universal Windows Platform
I have attempted to define the entry point via
[DllImport ("DES", EntryPoint = "AddSelectedObject")]
private static extern void AddSelectedObject(string name);
It seems no matter what I try, all proposed solutions lead to the "EntryPointNotFound" Exception.
What am I missing? Do I need to write a header specifically for the DLL? If so, do I call #include for the class headers containing the function definitions I need? Are they still defined by their respective class? It seems every solution I find is curtailed around C++ libraries that contain one class and one header instead of a complex standalone C++ project.
Please help!
↧
Is Unity not compatible with this library?
I am trying to import a DLL from a VS project and I'm "using System.Text.Json."
When i drop the build dll in my Assets folder i get the following error. Is Unity not compatible with this lib?
Unable to resolve reference 'System.Text.Json'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
↧
How do Managed Plug-Ins (DLL) work with different versions?
Suppose I followed the instructions on [this page][1] in the Unity manual to create a DLL.
In the project, I would reference UnityEngine.dll to use the UnityEngine classes and functions.
Would UnityEngine.dll be copied alongside my dll? Does that mean I'm stuck with whatever Unity version I referenced? I don't want to carry a copy of the entire UnityEngine dll!
And if it doesn't get copied but rather referenced via the path `C:\Program Files\Unity\Editor\Data\Managed\UnityEngine`, what happens when I distribute the dll to someone who installed Unity in a different location? Will the reference break? [1]: https://docs.unity3d.com/Manual/UsingDLL.html
Would UnityEngine.dll be copied alongside my dll? Does that mean I'm stuck with whatever Unity version I referenced? I don't want to carry a copy of the entire UnityEngine dll!
And if it doesn't get copied but rather referenced via the path `C:\Program Files\Unity\Editor\Data\Managed\UnityEngine`, what happens when I distribute the dll to someone who installed Unity in a different location? Will the reference break? [1]: https://docs.unity3d.com/Manual/UsingDLL.html
↧
↧
Amazon MWS
Does anyone have or know of any DLLs setup already to access Amazon Marketplace Web Services in Unity?
↧
Authorization using OIDC codeflow help
Hi,
I am trying to work through how to properly get an authorization method setup and running in Unity utilizing the OIDC codeflow and have run into numerous roadblocks. I have found some other methods that appear to just do OAUTH2 which although along those lines don't quite follow the flow necessary. I believe we use the PKCE flow if memory serves correct.
Does anyone have experience or the ability to assist?
I have tried working through this method here: https://github.com/peterhorsley/Unity3D.Authentication.Example which doesn't work after my securities team did some base testing as the DLLs its using don't seem to work for the flow our production environment requires and would require a ton of time to execute properly.
This is for a VR environment and from what I've seen this may require custom browser tabs to be built into the app as when I got the above git example running in VR it broke the communication link between the app and browser so it never returned after my login.
Any help or guidance would rule, this is above my usual simple RESTful interface experience I've used in the past. Not sure if it would require me getting someone in the company to work on some DLLs or not.
Thanks in advance.
I am trying to work through how to properly get an authorization method setup and running in Unity utilizing the OIDC codeflow and have run into numerous roadblocks. I have found some other methods that appear to just do OAUTH2 which although along those lines don't quite follow the flow necessary. I believe we use the PKCE flow if memory serves correct.
Does anyone have experience or the ability to assist?
I have tried working through this method here: https://github.com/peterhorsley/Unity3D.Authentication.Example which doesn't work after my securities team did some base testing as the DLLs its using don't seem to work for the flow our production environment requires and would require a ton of time to execute properly.
This is for a VR environment and from what I've seen this may require custom browser tabs to be built into the app as when I got the above git example running in VR it broke the communication link between the app and browser so it never returned after my login.
Any help or guidance would rule, this is above my usual simple RESTful interface experience I've used in the past. Not sure if it would require me getting someone in the company to work on some DLLs or not.
Thanks in advance.
↧
I upgraded to Unity 2019.3.7 from 2018.4.0. Firebase cannot found dll. Below is the error which appears on pressing Play button.
DllNotFoundException: FirebaseCppApp-6.0.0
Firebase.AppUtilPINVOKE+SWIGExceptionHelper..cctor () (at Z:/tmp/tmp.IBVQRwCCZa/firebase/app/client/unity/proxy/AppUtilPINVOKE.cs:118)
Rethrow as TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception.
Firebase.AppUtilPINVOKE..cctor () (at Z:/tmp/tmp.IBVQRwCCZa/firebase/app/client/unity/proxy/AppUtilPINVOKE.cs:138)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.AppUtilPINVOKE' threw an exception.
Firebase.AppUtil.SetLogFunction (Firebase.LogUtil+LogMessageDelegate arg0) (at Z:/tmp/tmp.IBVQRwCCZa/firebase/app/client/unity/proxy/AppUtil.cs:45)
Firebase.LogUtil..ctor () (at Z:/tmp/tmp.IBVQRwCCZa/firebase/app/client/unity/proxy/LogUtil.cs:69)
Firebase.LogUtil..cctor () (at Z:/tmp/tmp.IBVQRwCCZa/firebase/app/client/unity/proxy/LogUtil.cs:30)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.LogUtil' threw an exception.
Firebase.FirebaseApp..cctor () (at Z:/tmp/tmp.IBVQRwCCZa/firebase/app/client/unity/proxy/FirebaseApp.cs:56)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.FirebaseApp' threw an exception.
Firebase.Messaging.FirebaseMessaging+Listener..ctor () (at Z:/tmp/tmp.yvSxxzhXWW/firebase/messaging/client/unity/proxy/FirebaseMessaging.cs:37)
Firebase.Messaging.FirebaseMessaging+Listener.Create () (at Z:/tmp/tmp.yvSxxzhXWW/firebase/messaging/client/unity/proxy/FirebaseMessaging.cs:46)
Firebase.Messaging.FirebaseMessaging..cctor () (at Z:/tmp/tmp.yvSxxzhXWW/firebase/messaging/client/unity/proxy/FirebaseMessaging.cs:156)
Rethrow as TypeInitializationException: The type initializer for 'Firebase.Messaging.FirebaseMessaging' threw an exception.
PlayFabAuthenticator.Awake () (at Assets/MyScripts/PlayFabAuthenticator.cs:62)
UnityEngine.GameObject:SetActive(Boolean)
WelcomeManager:Awake() (at Assets/MyScripts/WelcomeManager.cs:38)
UnityEngine.GameObject:SetActive(Boolean)
LauncherManager:Awake() (at Assets/MyScripts/LauncherManager.cs:68)
↧
How to hide the game's taskbar icon
I want to hide/remove the game's taskbar icon without hiding the game window itself. Since Unity is not capable of this I have tried hiding the icon using WS_EX_TOOLWINDOW:
[C# Hiding an application from the taskbar][1], but had no luck.
[Here][2], it suggested that "-batchmode" can hide the taskbar icon, which is true but this command hides the window too.
----------
Achieving this should be possible since [here][3], using WS_EX_TOOLWINDOW someone was able to hide the icon so I am definitely doing something wrong. This is how my code looks like right now:
[DllImport("User32.dll")]
public static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
[DllImport("User32.dll")]
public static extern int GetWindowLong(IntPtr hWnd, int nIndex);
[DllImport("user32.dll")]
static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
private const int SW_HIDE = 0x00;
private const int SW_SHOW = 0x05;
private const int GWL_EXSTYLE = -0x14;
private const int WS_EX_TOOLWINDOW = 0x0080;
void Start()
{
IntPtr pMainWindow = Process.GetProcessesByName("Game")[0].MainWindowHandle;
ShowWindow(pMainWindow, SW_HIDE);
SetWindowLong(pMainWindow, GWL_EXSTYLE, GetWindowLong(pMainWindow, GWL_EXSTYLE) | ~WS_EX_TOOLWINDOW);
ShowWindow(pMainWindow, SW_SHOW);
}
Just to be clear, I'm talking about this taskbar icon: ![alt text][4]
[1]: https://stackoverflow.com/questions/8243588/c-sharp-hiding-an-application-from-the-taskbar
[2]: https://answers.unity.com/questions/1314410/make-application-close-to-the-tray.html
[3]: https://stackoverflow.com/questions/52031400/place-an-applications-icon-into-system-tray
[4]: /storage/temp/159279-capture.png
↧
↧
OIDC Authentication DLL compatability and web browser help
Hi,
Got a doozy of one here. I did ask before on a related topic but we have evolved past that one a bit it does seem (original question here: https://answers.unity.com/questions/1721862/authorization-using-oidc-codeflow-help.html). So we are still working through a way to do a OIDC PKCE codeflow within Unity for our Virtual Reality applications.
Where we seem to be stuck now is needing to figure out why some elements within the DLLs our C# DLL guy aren't cooperating. Turns out the DLLs have some desktop specific code which won't work as we're targeting Oculus Quest which is Android. Now it does seem some have reported success replacing a given DLL for .net 4.X with a .net 2.0 DLL.
He did say we could try using NUGET but that can bring about issues within Unity as NUGET pulls down various versions of the same DLL which I know from my years of Unity experience Unity gets unhappy with. Curious if anyone here has workarounds, success or a way to utilize NUGET within a Unity application. One more possibly more difficult issue is part of the OIDC flow involves a web browser for the authentication and we are also looking for a good solution for that within the Oculus Quest as currently if I attempt to utilize the built in browser inside the Quest it breaks the communication link between the app and browser. So we need to find a reliable solution for a browser or custom browser tab that is built and distributed within the app itself not relying on the device's built-in browser.
Another snafu here is we are utilizing URP (Universal Rendering Pipeline), I know Vuplex has a really solid looking one that doesn't support URP well (yet) and I did find one that I'm trying to get a keyboard I built for VR to interact with as an external keyboard isn't a solution, so curious if anyone knows or has one here that may be of help.
Whew, that's a lot.
TLDR: We are trying to do a OIDC PKCE codeflow within Unity for our Virtual Reality applications on the Oculus Quest. We are running into IdentityModel DLL issues that are running desktop functions/code which obviously isn't Quest/Android compatible so we're trying to get these .net 4.x dlls to cooperate or find a way to get the same .net 2.0 ones in there to see if that'll work using NUGET which doesn't play well with Unity. Lastly we need a built-in web browser solution for the application that works with URP.
Where we seem to be stuck now is needing to figure out why some elements within the DLLs our C# DLL guy aren't cooperating. Turns out the DLLs have some desktop specific code which won't work as we're targeting Oculus Quest which is Android. Now it does seem some have reported success replacing a given DLL for .net 4.X with a .net 2.0 DLL.
He did say we could try using NUGET but that can bring about issues within Unity as NUGET pulls down various versions of the same DLL which I know from my years of Unity experience Unity gets unhappy with. Curious if anyone here has workarounds, success or a way to utilize NUGET within a Unity application. One more possibly more difficult issue is part of the OIDC flow involves a web browser for the authentication and we are also looking for a good solution for that within the Oculus Quest as currently if I attempt to utilize the built in browser inside the Quest it breaks the communication link between the app and browser. So we need to find a reliable solution for a browser or custom browser tab that is built and distributed within the app itself not relying on the device's built-in browser.
Another snafu here is we are utilizing URP (Universal Rendering Pipeline), I know Vuplex has a really solid looking one that doesn't support URP well (yet) and I did find one that I'm trying to get a keyboard I built for VR to interact with as an external keyboard isn't a solution, so curious if anyone knows or has one here that may be of help.
Whew, that's a lot.
TLDR: We are trying to do a OIDC PKCE codeflow within Unity for our Virtual Reality applications on the Oculus Quest. We are running into IdentityModel DLL issues that are running desktop functions/code which obviously isn't Quest/Android compatible so we're trying to get these .net 4.x dlls to cooperate or find a way to get the same .net 2.0 ones in there to see if that'll work using NUGET which doesn't play well with Unity. Lastly we need a built-in web browser solution for the application that works with URP.
↧
Which .DLL file is associated with .SHADER files?
After accidentally changing the default program Windows associates with .shader files, I have managed to restore the association settings to the point where Windows simply doesn't know which program to open .shader files with - before I made any changes the correct association read "DLL-file for Windows interface" (approximate translation, my system is not in English). My question is thus, which exact .DLL file should I associate with .SHADER files, and where do I find the file? I'm using Windows 7, if that's relevant. I would have simply restored the registry, but I haven't backed it up in several years. I'm not very tech savvy, so a clear answer would be much appreciated!
↧
Classes that inherit UIBehaviour in a DLL no longer visible in Unity editor.
I recently upgraded to Unity 2019.2 from the last version of Unity 2018, and see that any of our classes that inherit from a UIBehaviour are no longer visible as a component to add, and that all references to them have broken. By selecting the DLL, I can see that they no longer show up as possible components, but others that do not inherit UIBehaviour do show up.
I believe I have properly added the Unity DLLs to our library project, seeing as everything compiles, but I theorize that's still the issue. In Unity 2018, you only needed UnityEngine (and UnityEditor for editor DLLs). In 2019, it appears you need a ton more. I couldn't find any recent documentation on the subject, so I eventually stumbled upon the "solution" myself.
I have referenced all DLLs from `C:\Program Files\Unity\Hub\Editor\2019.2.1f1\Editor\Data\Managed\UnityEngine` except for the Unity.Cecil dlls and Unity.Legacy.NRefactory.dll.
↧