Category "unity3d"

How to lock position of physic body in z axis in Unity 3D

I am developing a 2.5D game. In that game I want my character (which has Rigidbody component attached to) to just move on x and y axises. So I use this code sni

Unity Netcode for gameobjects with relay - calculate ping

I am having trouble calculating the ping of players in Netcode. I have a list of lobbies, and I want to display the expected ping of each of them, before the cl

"Shader Unsupported" when starting Unity server with -batchmode -nographics flags

I am trying to make a Unity game with their new MLAPI (Mid-level networking API). I've followed this tutorial exactly without changing anything, and the game is

Stop Rigidbody Movement/Rotation instantly after collision

I want my sphere to jump from one position to another but don't want it to translate afterward. I can't figure out how to do that. Here's my code: void Update(

OnHandMeshUpdated() not triggered in Mixed Reality Toolkit

I'm working on a Mixed Reality app in Unity. I'm trying to update my own hand mesh according to: https://docs.microsoft.com/en-us/windows/mixed-reality/mrtk-uni

Unity Scripts edited in Visual studio don't provide autocomplete

When I want to edit C# Unity scripts, they open in Visual Studio. It is supposed to provide auto complete for all Unity related code, but it doesn't work. Here

Reload Scripts Assemblies (busy for long time) Unity Freezes

I'm Using Unity version 2020.3.32f1 & Rider as Editor. Whenever I make any changes in scripts, even small changes, Unity script assemblies take too much of

Unity MLAPI ServerRPC not getting called

I'm implementing a system in which a player can pickup an item from the game world. After picking the item up, I want to destroy the game object. To do this, I

a javascript error occurred in the main process, Unity hub

After I installed Unity hub and tried to Launch it in Windows 10 , "a javascript error occurred in the main process" appeared. Anyone encountered the same err

Does cross-platform C++ require building separately on every single platform?

My question actually has two variants, but for some context, I have a C++ *.DLL that I use with Unity using P/Invoke. It's built on Windows 10 with MSBuild (pla

The .gitignore setting for the .idea folder of Jetbrains Rider's does not work

I am currently working on a game project for Android using Unity and Rider on Windows10. Git administration is using Github Desktop. After completing the game

Weird Lines 3D Unity

I'm working on a project, using unity 5.4. In this projects blocks are stacked next to eachother. However there appear some annoying weird lines. Also on andro

Find closed loops between a series of connected points

So I've been trying work out how to approach what i initially was a simple problem - turns out i'm an idiot and have no idea what i'm doing. Firstly my data st

I'm getting this error when trying to run the mlagents-learn command. All the correct versions of the correct packages are installed in a venv

I'm trying to use this toolkit to get the hang of creating machine learning agents in simulations. It seemed like the easiest one out there, so I followed a tut

AR Object is moving with the camera in unity

i create a GameObject in unity where my GPS is,and setting the unity camera with the GPS after I convert it to xyz here is my problem: when I move the android d

When I click on an Object with an Audio Source all sounds of the game play at the same time

I'm making a sound game for kids where they have to place notes in the proper line that sounds like the note. So I need the notes and the lines to play a sound

Unity: Generic Method to get or add a component

Every time I make a new Script in Unity, I always end up doing a bunch of checks for any components my script depends on, like: SpriteRenderer sr = gameObject.

Json.NET in Unity throwing 'The type or namespace `Newtonsoft` could not be found'

I used nuget to install Json.NET into my Unity project but the issue is when I launch it throws The type or namespace 'Newtonsoft' could not be found. Are you m

Json.NET in Unity throwing 'The type or namespace `Newtonsoft` could not be found'

I used nuget to install Json.NET into my Unity project but the issue is when I launch it throws The type or namespace 'Newtonsoft' could not be found. Are you m

Programming Unity Games with Ruby

So I see that unity has the support for c#, JS and Boo. I could learn one of these but I would like to make a 'compiler' or something similar that would let me