Category "unity3d"

Problem with transform.rotation in unity c#

I`ve been doing a game and i got a problem , i tried to do a jumping cube but if you jump a lot the cube can rotate , i tried to restrict rotation by using: //

How do I make my C# code for Unity in Visual Studio look/work like in the tutorial (picture)

I'm trying to make a mobile game with Playfab and Unity. It's my first time using Unity and Visual Studio. Usually I'm only using VS Code. The code is working

How to translate c# Task to Unity coroutine (OnCollisionEnter2D)

help to translate this code in coroutine. Im making game in unity and need to creat coroutine for it. I try made it, but it doesnt works. private void

Unity: skinned mesh vertexbuffer output slightly different than correct results

It’s like this hip is stuck in place, with in the pictures(being at different times in the animation since I can’t upload a gif) the red wireframe i

Plastic SCM change server/organization in Cloud

as I just installed Plastic SCM on my home computer, and connected through Unity, I was prompted to choose Organization. I managed to select the incorrect one a

How to spawn only one object in Unity AR foundation

I new for Unity and C# can someone help me? I'm creating a kids game and they tend to tap on the screen accidentally and as they look around but then they spawn

SketchUp and Unity3D

I use SkethUp for 3d-modelling. I have some problems with exporting the models with images in Unity, the images aren't exported if I use file.skp and are export

pls HELP ME HELP ME HELP ME HELP ME [closed]

i was making a game in unity and i got this error: Assets\PlayerController.cs(37,21): error CS0120: An object reference is required for the no

In a probuilder object with inverted normals. Collision seems to not work with this one item

I have made my level out of a probuilder object that has inverted normals so the player may exist inside of it. This has caused some issues as for some reason.

joystick positioning relative to screen size

I want the joystick fixed on the bottom-right the screen, no matter the resolution/window size. Although my solution works, there must be a cleaner code for thi

Add Component to GameObject that is locally safed

I want to safe a configurable joint as local variable, destroy it than (do stuff) add the configurable joint. Joint joint = outsideBodyPart.GetComponent

Unity android gradle build fails duplicate class

I have been looking for the last few days for a solution to my problem. I have multiple SDKs imported in my project (firebase, facebook, admob, etc) and it was

Unity - Make character look at mouse with New input system/Character Controller

Been following this guide https://youtu.be/bXNFxQpp2qk?t=1280 for Character Controller. This got me getting basic movement working and at time 21:20 he creates

Unity HDRP Dark Pixels on random objects and edges

I have been trying to fix this problem for the past 5 days There are a lot of annoying dark pixels on multiple random objects. Examples: Walls/Pillar: https://i

checkjni error happen when use android studio build apk, while use unity build apk run well

with my jni demo, i use CallStaticIntMethod to call java method with boolean return. then i build this to .so, when i use this so in android studio project, the

Failed resolution of Landroidx / ActivityCompat;

I'm trying to make a java library for my Unity game. In this case I want get permission from Android API. However, I get an error: AndroidJavaException: java.la

I keep getting a "scriptcs" error in my C# code for Unity. Nothing I've seen on the internet is working

here is the code: using System.Collections; using System.Collections.Generic; using UnityEngine; public class CarDrive : MonoBehaviour { [SerializedField]

Video call on Unity with WebRTC without server

I'd like to make a video call app using WebRTC on Unity. I have investigated almost of the WebRTC services and found out that the WebRTC services require "my ow

How can I get Time.time as a fixed integer after an event happens in Unity

I want to display on the screen that the player has achieved their goals in this much time after playing the game. But when I display Time.time it keeps changin

Float3 array values are different in compute shader than what I sent them to be as from C# script in unity?

So I am using a compute shader in unity to find groups of vertices that overlap (are the same as) other groups of vertices in a Vector3[]. I have a List < Li