Hot answers tagged

5 votes

How can I guarantee a solvable Fifteen Puzzle shuffle?

The solvability of an n puzzle can be tested (after shuffling) by computing the permutations of the puzzle. "While odd permutations of the puzzle are impossible to solve, all even permutations are ...
Kokeb's user avatar
  • 151
3 votes

Handling keyboard input in SDL2

This could be a hardware issue as stated by @Quentin. Anyways, you could write a workaround tracking the KEYDOWN and KEYUP events instead of trying to fetch the keyboard state, i'm not pretty sure ...
PRDeving's user avatar
  • 755
3 votes

Visual Studio can't handle my unity scripts

Seems you don't have the Unity plug-in for VS Community. The project should open as a C# assembly project like the following. It's in tools and features, go get it. Good luck.
suvam0451's user avatar
  • 171
3 votes
Accepted

Why are quads not rendering with OpenTK 4.7.5 when similar code works with OpenTk 3.3.3?

The issue with the code is that PrimitiveType.Quads is not supported in OpenGL 3.0 and above, which is used by OpenTK 4.7.5. Instead, use ...
Nick NaSvlishvili's user avatar
2 votes

How do I compile a namespace to a .DLL in Unity?

Yes, that's basically how it works. But DLLs aren't exclusive to unity. DLLs are a widespread concept for reusable code components in many different programming languages. Just to make clear that ...
qCring's user avatar
  • 620
2 votes

XNA draw a rectangle 3D perpendicular to camera

This can be done many ways, here I'll give you non language or engine specific answers. The first way to do it is useful, if you don't want to or can't use shaders, you need to get the angles of the ...
Bálint's user avatar
  • 14.8k
2 votes

Point welding on generated terrain

Shouldn't your adjacent function be like this: ...
Fredrik Lundvall's user avatar
2 votes

How can I fix my project after upgrading to Unity 2019 / .NET 4.x?

Go to Edit > Project Settings > Player and change the Scripting Runtime Version to .NET 4.x Equivalent. Restart Unity and the project should compile again, unless ...
Pikamander2's user avatar
2 votes

Can I use System.Windows.Rect in Unity?

Instead of using System.Windows.Rect I'd just write extension methods: ...
andrew zuo's user avatar
2 votes

Can I use System.Windows.Rect in Unity?

It will not work as unity uses Mono and a subset of the core libraries, Windows is not going to be one of them. Unity Rect has Contains and Overlaps to do logic tests for rects and points.
Ian Pilipski's user avatar
2 votes
Accepted

High-performance update of a bitmap grid

the accuracy should be in 1-2ms intervals You are out of luck here, getting high and steady frame-rate in WPF is impossible by design. Still, you can get decent 60Hz, and anything above requires high-...
Shadows In Rain's user avatar
2 votes
Accepted

Porting Plugins from UE5.0 to UE5.1 source build causes DLL Registration Errors

I had the same problem when trying to compile BlueprintAssist in Engine/Plugin/Marketplace; this used to work in UE4, but it's ...
leetNightshade's user avatar
2 votes

Why is HttpClient failing in Unity?

You specifically say that you want to use SSL/TLS encryption (SslProtocols = SslProtocols.Tls12,), but the protocol-part of your address is ...
Philipp's user avatar
  • 118k
1 vote

Working with websockets in Unity: Cannot convert lambda expression to type 'IObserver<ReconnectionInfo>' because it is not a delegate type

anonymous function is not the same as an object representing an anonymous function. you're trying to pass in anonymous function, but you need to wrap it in the object representing it and pass that one ...
sh code's user avatar
  • 196
1 vote

Coverting byte[] from stereo to mono produces crackling in OpenAL

so for anybody struggling with stereo to mono conversion (16 bit pcm stereo) Here go's a solution: ...
David Neves's user avatar
1 vote

How should I load/change/activate scenes?

I am not sure if you have read the documentation or not on the matter but I would review here SceneManager The build index is the numbers to the right on your pic of the build settings so you have a ...
Justin Markwell's user avatar
1 vote

How to calculate more precisely the position of the pupil in function of the eye ball and a direction?

I can't provide you with the code solution, but here's some formulas you might find useful to do it yourself: Calculate eyeball position: ...
Ocelot's user avatar
  • 1,423
1 vote

Unity - Scripting Runtime Version Option Missing

Starting from Unity 2019.2, this option is no longer available in the project settings. To solve this, I had to install the 2018.4 (LTS) version.
leosbrf's user avatar
  • 11
1 vote
Accepted

How do I use SharpDX with the .NET Core framework?

So, for anybody looking to find an answer to this in the future, the answer is "No." You can not use SharpDX with .NET Core (note that VS Code supports only .NET Core if you develop in C#). ...
Scorch's user avatar
  • 257
1 vote
Accepted

How to use JWT in unity

afaik unity isn't currently capable of running on microsoft's own .NET framework, but rather uses mono an open clone of .NET The version number you mentioned is the mono runtime version. That ...
Timothy Groote's user avatar
1 vote

Unity3D 5.5b : C# WebGL open email client Win32 exception error

The solution is to use Application.OpenURL instead of Process.Start Example: Application.OpenURL("mailto:[email protected]?Subject=Hello%20again&body=TEST");
Xeon's user avatar
  • 308
1 vote
Accepted

Disabling, overriding or hooking a VS warning to Unity's Vector's ToString()?

This is not possible. Unity Vectors are structs. Therefore you cannot derive your own vectors and of course not override ToString(). You will have to use this other ...
Olivier Jacot-Descombes's user avatar
1 vote

Unity - job system compatibility for end user?

.NET is not installed onto the computer in the same way something like Java is. .NET is handled through the OS and Unity's additional functionality is given in the build. According to your link, if ...
JAL's user avatar
  • 21
1 vote

System.Net.Http.dll and Unity 2018.2.1, 2.2, 2.3 are conflicting, assembly reference keeps being deleted in VS 2017, any suggestions?

Unity will override the .csproj files every time it recompiles the scripts. To fix this, you must include a script that will listen for the generation of the project files event and add the reference ...
Grumpy Dot's user avatar
1 vote

Is there a way to invert collision detection in unity?

It turns out this is actually how Unity's collision system already works. I had thought from using it before that a box would just push out another box, but it seems to simply be 4 edges in a box ...
Mike Lyle's user avatar
1 vote
Accepted

Linq with Unity - Select One from Many

I think this post on "How to use linq to find the minimum" will give you some ideas on this. The MinBy extension method in MoreLINQ is likely your best bet, as ...
sonnyb's user avatar
  • 596
1 vote
Accepted

How do I set up an SFML .NET dll reference in Visual Studio Code

I added these references manually to .csproj file as item group. e.g. https://github.com/kubagdynia/Spacetris/blob/master/Spacetris/Spacetris.csproj
Jakub Kurłowicz's user avatar
1 vote

Multi-threaded MMO Server with complex inter-dependencies.

I'm just a hobby gamedev but it sounds to me that you have an general desing issue. I belive it's not a good design to handle player actions on a per thread basis, for sure you can move calculations ...
user743414's user avatar
1 vote

How to display full website in Unity WebGL?

There is currently no plugin that renders a website and supports WebGL. I conclude two things from this. A, you have to do it yourself, get ready to research website rendering, suitable libraries ...
Morothar's user avatar
  • 131
1 vote
Accepted

Validate single player game packet on a server

If you are using Unity colliders and use collisions from them to control the simulation, chances are you don't have a deterministic simulation. You have a few options to deal with that: Make it ...
bcrist's user avatar
  • 2,348

Only top scored, non community-wiki answers of a minimum length are eligible