This is a copy of a question from StackOverflow in Russian. Translated by DeepL
In Unity, even in a newly created project, there are a number of bugs:
Socket: bind failed, error: An attempt was made to access a socket
using a method prohibited by permissions. (10013)
Unable to join player connection multicast group.
Assembly for Assembly Definition File
'Packages/com.unity.textmeshpro/Tests/Runtime/Unity.TextMeshPro.Tests.asmdef'
will not be compiled, because it has no scripts associated with it.
UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:TickCompilationPipeline
(UnityEditor.Scripting.ScriptCompilation.EditorScriptCompilationOptions,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget)
The latter only at the first launch of the created project.
Unity version - 2019.4.26f1 (64-bit)
What is this and how to fix it?
P.S. The answers I have found do not help.
TextMeshPro is a preview asset that you might want to delete(unless you're actively using it, which I doubt since this ran on initial startup).
Related
I have written a mod for a video game that has a basic level of mod support, and provides a loader and access to game data etc. Currently the UI for the mod is using the IMGUI and I want to get rid of it.
I've been trying to write a proper UI in Unity, building an assetbundle but am struggling on getting my mod to actually load it.
As a POC I created the exact UI from the manual below, and the C# Script to build the bundle. This works, the manifest file lists my asset inside of the bundle.
https://docs.unity3d.com/Manual/UIE-HowTo-CreateRuntimeUI.html
https://docs.unity3d.com/540/Documentation/Manual/BuildingAssetBundles.html
Inside of the game when I try and load this asset from my mod at the most basic level I'm getting an error
Unable to read header from archive file: C:/Test/CustomAsset/customui.assets
Failed to read data for the AssetBundle
Script used to load test:
var bundleLoadRequest = AssetBundle.LoadFromFile(
Path.Combine("C:\\Test\\CustomAsset", "customui.assets"));
Log(bundleLoadRequest.GetAllAssetNames().ToString());
I know this path is valid because if I type an invalid path I get a different error "unable to locate asset" or something to that effect. If someone could please assist in pointing me in the right direction
Asset Bundles generally only work for the Unity version they are built with. Is it possible there is a mismatch between your editor version and the version the game you are modding was created with?
Sadly there is no Version check at the beginning that will let you know and they just won’t work.
I am trying to convert a windows desktop application from WinUI 2 to WinUI 3. However, I am having a problem with the Windows.Storage.ApplicationData class. When I call ApplicationData.Current (so I can access a file in the app's local data store or to get a local setting) a System.TypeInitializationException exception is thrown.
The following screenshot shows the problem:
System.TypeInitializationException
(This is a default application that I created in Visual Studio 2022 using the project template "Blank App, Packaged (WinUI 3 in Desktop)", the only change I made was to add the line to get the current ApplicationData object in the App class's OnLaunched() method:
var appData = Windows.Storage.ApplicationData.Current;)
Any idea what I am doing wrong here? I think maybe there is a trust or cababilities issue, or I should use other methods to get the app's local data folder or settings for a WinUI 3 desktop application.
I encountered the same problem recently. No matter where I made the call in my WinUI 3 application, whenever I invoked a call to the ApplicationData API, I would always encounter the same exact exception (System.TypeInitializationException with an inner COMException). I failed to find an answer in the API documentation, particularly where one would hope to find such an answer. (If it's there, it's buried or perhaps easily overlooked by someone who is not as familiar with .NET programming, such as myself.) The following line of code always threw an exception for me:
ApplicationDataContainer localSettings = ApplicationData.Current.LocalSettings;
The solution that worked for me was something I learned from a response to an issue on the WindowsAppSDK GitHub repository. To quote the information I found most relevant to the issue I was having:
A client that is not running in an App Container must open ApplicationData using this API: https://learn.microsoft.com/en-us/uwp/api/Windows.Management.Core.ApplicationDataManager?view=winrt-22000, while a client that is running in an App Container must open ApplicationData using this API instead: https://learn.microsoft.com/en-us/uwp/api/windows.storage.applicationdata?view=winrt-22000
Basically, I learned that I needed to open ApplicationData using the ApplicationDataManager class. As noted from the GitHub link, the solution I found was to replace the offending line of code with the following:
var localSettings = ApplicationDataManager.CreateForPackageFamily(Package.Current.Id.FamilyName).LocalSettings;
From there I can save and load app settings as usual, which is suitably explained here:
localSettings.Values["test setting"] = "a device specific setting";
String localValue = localSettings.Values["test setting"] as string;
Hopefully this helps anyone who finds themselves facing the same issue.
Scratch that, the problem only happens if in the debugger I put a breakpoint on the "ApplicationData.Current" line. Very weird. I think I am having the same problem as here:
Getting values of ApplicationData.Current.LocalSettings in static context
I am pretty new to Unity and Vuforia. I am trying to do solve this following problem. I have a script file that I am using for 2 different Image targets. Only 1 script should be running at a time. So i opened "DefaultObserverEventHandler.cs" to handle tracking events. I want to disable the script on that particular Image target when the tracking is lost. But when i try to get a reference on the script "QuizzBehaviour" i get an error. "QuizzBehaviour" is located in my Assets folder. Thanks in advance.
Ok, I fixed it. I made my own "DefaultObserverEventHandler.cs" script and placed it in the same folder where my "QuizzBehaviour.cs" script is.
"Find" will search through objects in scene not in your folders.However, at all costs you should avoid searching for objects by typing their name manually.In your case, the matter is quite simple. You can either add a script to an object and then use the get component command, or you can make an abstract class and refer to it.
I am needing some help. Not very strong into coding but I need to understand why something isn't running for me.
I need to be able to connect an IP based camera to Windows. This is a new feature for windows when 1903 was released. If you look at the link below you will see what I'm referring to.
https://www.howtogeek.com/443847/windows-10-is-getting-built-in-support-for-network-cameras/
The issue is - the cameras I'm using require a password. This is not as simple as going in and adding the device manually. If you see the document below, the "Custom device" pairing is what I'm needing done.
https://learn.microsoft.com/en-us/windows/uwp/devices-sensors/pair-devices
As you can see this has to be coded to accomplish what I need. So this source code was referred to in the link below as something that should be able to do it.
https://github.com/microsoft/Windows-universal-samples/tree/master/Samples/DeviceEnumerationAndPairing/cs
Doing this in C#. Edit: I made sure to put all the shared files in the CS folder.
I'm using Visual studio and i pulled up the entire project but when I run it i'm getting an error that "The parent file, 'Scenario1_DevicePicker.xaml', for the file 'Scenario1_DevicePicker.xaml.cs' cannot be found in the project file.
I get that error for each .cs and .xaml.cs file there is. (Scenarios 1-9)
Can anyone help me out? Perhaps nudge me in the right direction?
First question on here and I am feeling pretty stumped, I've searched around but couldn't find something that I could apply to my situations, any help or direction to a prior question would be appreciated.
I'm receiving an error when trying to create some new files from my form. I'm following a guide at XNA Game Programming Academy (xnagpa_net/xna4rpg_php), I'm up to step 14 but I believe this started happening earlier and I hadn't noticed it yet.
Screenshot of Error
Please have a look at the above error and give me any tips.
My code for RpgEditor.FormMain.cs is here, it says something about line 128 which relates to;
if (Directory.Exists(gamePath))
throw new Exception("Selected directory already exists.");
I'm not sure why though, because I'm creating a brand new folder/directory when I am attempting to save the data.
If it helps, the subdirectories are being created by the process but I recieve that error and no files inside.
edit: I've downloaded the example project on his site and it's working fine with that, so I don't believe it's an issue with my system configuration.. must be a project setting or line of code somewhere..
To fix this I had to change the configuration settings.
It was set to AnyCPU but I had to change to x86.
The setting wasn't there originally, I had to create new and copy settings from AnyCPU.
Why this works I don't know, but it does :)