Questions tagged [unity]

Unity is a cross-platform game creation system that focuses on easy art pipeline process. It consists of a game engine and an integrated development environment. The game engine's scripting is built on Mono.

Filter by
Sorted by
Tagged with
1
vote
2answers
32 views

How to have unity inspector variables modify each other bidirectionally and update in real time [duplicate]

Trying to make some inspector controls that both modify the same thing but in different ways, and I want them to both update when the other is edited. Won't bore with the details but there's a reason. ...
3
votes
1answer
114 views

How to protoype a multiplayer game whose fun comes from having lots of features

I've seen plenty of testimonies that to make a good game and not waste time, one should prototype early, quickly see if the core is fun as is, and not focus on graphics, menus, sound, secondary ...
-1
votes
1answer
27 views

Why I'm getting message in the editor console window , Look rotation viewing vector is zero?

Look rotation viewing vector is zero UnityEngine.Quaternion:LookRotation (UnityEngine.Vector3) Waypoints:Update () Why I'm getting this message and what should I do with it ? It's not a warning and ...
0
votes
2answers
52 views

What is the best way to make firetruck outriggers push firetruck up on specific corner

Unity3d Hello, I'm trying to recreate functionality of outriggers stabilizing a firetruck before the ladder is raised up. How would I go about making the downward force of the outriggers lift the ...
11
votes
1answer
3k views

How can I "zero out" velocity in an arbitrary direction?

I'm currently running into an issue with my character controller using physics-based movement of rigidbodies in Unity. Here's an illustration of the issue I'm facing: Basically, after a jump, my ...
1
vote
1answer
94 views

How can I draw gizmos only at runtime?

...
0
votes
0answers
149 views

When I tried upgrading my project to a newer version of unity, then downgrading it to the original one, it gave me 3 errors having to do with sprites

So I upgraded my project to a newer version of unity because some dude told me that i could export my game (i couldn't). So I downgraded my project to my original editor version and it gave me these 3 ...
0
votes
0answers
17 views

Unity touch position infinity

When I try to get the touch#1/position [Touchscreen] I receive as value (Infinity, -Infinity) with the new input system of Unity3D My settings are Passthrough and Vector2 as expected value. The ...
0
votes
1answer
38 views

How do I create a method that adds a new sprite to the game?

I want to have a script in my game that adds a card. I am using a Card class for all my cards, so I don't have to make a prefab for each card. Instead I can do ...
0
votes
0answers
34 views

How to snap an object to an axis in 3D?

I have a script that lets player move a Rigidbody in my game with a mouse, and I want some objects to snap to other objects' axis (let's say guide) when they are near. So when an object is close to ...
-1
votes
1answer
42 views

How To Avoid GetComponent on raycasts and collisions

GetComponent() is suggested to not be used so frequently because it can cause a performance impact. I'm working on a game that needs to check the components of ...
-1
votes
1answer
28 views

Bullet Fire stuck on loop

When i shoot my bullet the unity explosion prefab keeps playing I have a gun Script ...
0
votes
1answer
37 views

How to knock animated character backward when sword strikes wall

I was wondering how to make animation and physics interact. Specifically, I want to make it so when my character (rigidbody) plays a sword hit animation (swinging the sword in front of it), it makes ...
0
votes
0answers
13 views

Deserializing Unity Mixed mode into YAML

is there a way to deserialize .unity and ProjectSettings file in binary format down to yaml? I provide an example of one of such ...
0
votes
0answers
42 views

How can I implement procedural generation with an undetermined amount of types of terrain?

I'm trying to create a very modifiable game starting with terrain in the form of a tilemap. Any type of tile can be removed, modified, or created by the user. The problem is that I can't find a way to ...
0
votes
0answers
52 views

Photon PUN OnPlayerEnteredRoom not triggering

I'm very new to Photon, medium experience in Unity. I'm trying to implement a lobby where, once a player enters the room before the game starts, a player card pops up for them ie. just their picked ...
-1
votes
1answer
28 views

How to rotate my enemy so it scans the area?

Hi I am new to unity so I am not super familiar with methods. I am trying to make my enemy rotate left then right double the amount that it rotated and back to the middle like this: +10 degree, -20 ...
3
votes
1answer
931 views

Why is there only one variable displayed in the Inspector?

Using the following code, only one variable is shown in the inspector: [SerializeField] private GameObject _obj; This makes sense, since there is only one field. ...
-1
votes
1answer
32 views

Why does a public variable define a private one? [closed]

What is the point of such work with variables? public GameObject Obj => _obj; [SerializeField] private GameObject _obj; A private variable loses its privacy ...
0
votes
0answers
13 views

Humanoid Rig force knee of my character to rotate, but it shouldn't be

Demonstration of the problem - video My export settings My Unity import settings Rig Settings Animation Settings
0
votes
0answers
16 views

A method not getting called because of a NullRefrence exeption error [duplicate]

I am getting a nullrefrenceexception error from my main script where I try to run a method from another script and I get that error. I also get this warning: "You are trying to create a ...
0
votes
2answers
29 views

Humanoid rig breaks my animation

The humanoid rig behaves strangely with my animation from Blender. Here is a demo of the problem - video. Can anyone suggest what the problem might be?
0
votes
2answers
41 views

How to make windows that pick up what appears in the other

Basically there are 2 windows that you can drag and drop around the screen. Whatever appears in one window will also appear in the other. The two windows cannot go one over the other. This is a demo ...
0
votes
0answers
55 views

Why does this work but this doesn't even though they are the same thing?

In my game I am trying to trigger the death animation but it doesn't work when I use anim.SetBool("isDead", true); however when I use ...
0
votes
1answer
28 views

Getting info about the script a [PropertyAttribute] is attached to in Unity

Is there a way to access info about the script that a PropertyAttribute is part of in Unity? In my case: getting the memberInfos of the script: ...
2
votes
1answer
72 views

Why is Unity using a Quaternion for rotation, but a Vector3 for angular velocity?

Unity uses quaternions for storing the rotation of rigid bodies, but vectors for the angular velocity. Why? I thought you'd use a quaternion instead of that vector also. I don't know much about ...
0
votes
0answers
38 views

Render mesh to texture via command buffer in Unity

So I'm rendering a mesh to a render texture for an outline effect. In the HDRP pipeline UnityObjectToClipPos doesn't seem to work because when I try to merge the ...
0
votes
0answers
24 views

How do I debug multi-touch for a Unity on Android platform?

I'm trying to implement multi-touch in my game but there are many bugs so far and I need a way to get info on all of the touches as the game is running. So far I haven't found any way to do this.
0
votes
0answers
14 views

Struggling to get layer collision to work without stopping movement

I currently have my player object set with a dynamic rigidbody and a box collider, and the object I want it to collide with just has a box collider. The player is on the Player layer, and the object ...
0
votes
0answers
12 views

Data not saving across scenes [duplicate]

I've been trying to save a player's score with PlayerPrefs, however every time i change scenes, the game simply stops tracking the score and doesn't even add score when told to, anyone has any idea of ...
0
votes
0answers
22 views

How do I pass a temporary render texture generated by a command buffer to a material?

I'm working on an outline effect for my game. I want to do the render buffer based methods since the outlines are imo of much higher quality. I can render the selected objects into the buffer as ...
0
votes
1answer
25 views

How do I change from virtual camera (e.g dolly track) to main camera?

I want to show a cinematic view of my scene and then be able to play it with the camera attached to my player. I have set up a dolly track and virtual camera and all works fine but I can't then play ...
0
votes
1answer
29 views

Callback to a dynamic value in GameObject.transform

I'm currently writing an InputManager using Unity's "new" input system. The InputManager receives all player input ...
0
votes
2answers
50 views

Loop over a list with within X seconds

I have a list of harvested crops. There's a capacity of let's say 100 crops(100 items in a list). Now I want to empty the list within X seconds when max full (2 sec in my case). This should be ...
0
votes
0answers
86 views
+50

Professional way to make Isometric 3D Tilemaps for an ARPG in Unity3D?

I'm was working on a top-down ARPG and now I'd like to switch to 3D Isometric. I know that I can place prefabs on Unity's tilemaps, and also have an X-Z grid, etc, but are they designed to handle ...
-1
votes
1answer
18 views

How to Rotate Camera only once

I have a simple camera rotate script which rotates the camera around my game scene i only want it to do it once at the start to show off the level or how can i rotate it a whole 360 degrees then stop? ...
0
votes
0answers
13 views

How to implement spelling autocorrect in a TextMeshPro InputField?

How can I implement spelling autocorrect for Unity's TMP InputFields on Android?
0
votes
1answer
32 views

How can I create a custom plane with raycast?

...
0
votes
1answer
28 views

Does the Z axis matter at all in a 2D project, when using layer collision for all collision detection?

As I understand it, the Z axis is responsible for the rendering position of the object in relation to the camera/other objects, and layer collision only checks if an object collides based on the x/y ...
0
votes
0answers
19 views

Rotate object from its current rotation value

I am rotating my gameObject with the rotation of another gameObject - "hand" in its z-axis. The rotation of the object jumps to the current rotation of the hand and then it starts to rotate ...
0
votes
1answer
75 views

Unity UI - Multiple Selection with Multiple Toggle Group

I am developing a game with Unity 2019 LTS. And there is a menu scene in the game. Player should select a character and difficulty level in that scene. Both of them have multiple options. For example, ...
0
votes
0answers
41 views

creating assembly files for third party libraries

I basically have a huge project and we just came to know about assembly definitions could speed up our compile time. I've got a lot of libraries hooked in, and when I tried to simply add an ...
0
votes
0answers
30 views

Unity Mock HMD not rendering with ARCore installed

I am trying to create a mobile vr game with ARCore in Unity for positional tracking, and I can't get the Mock HMD to render. I tried the Cardboard SDK but it didn't work so I am trying to use Mock HMD....
0
votes
0answers
30 views

How do i prevent the next player from being called?

I got help from someone on making a turn-based button but so far I am not able to prevent the button from getting the next player when a certain bool is activated in the room. Initially, the ...
2
votes
1answer
42 views

How to generate a correct RGB + Luminance histogram?

I am trying to create a debug tool that would help me visualize an image RGB and luminance histogram. I have created a compute shader where I gather the histogram data ...
0
votes
0answers
28 views

What is the easiest way to setup leaderboard and achievements in unity?

How do you guys setup leaderboard and achievements in your game. I have finished my game and want to add these stuff on both android and app store. What's the easiest way to go about it?
0
votes
1answer
30 views

desired velocity and the local space z axis

This question is related to my previous post here , but, even though I did get some insight, I didn't fully get it, and hence have another dilemma. Since the dead earth series is not publicly ...
0
votes
0answers
35 views

What's a good architecture for a simulation?

I have a concept that involves a world being simulated. Lots of entities and processes acting upon them, not to mention interactions, etc... Every SimulationTick, ...
0
votes
0answers
22 views

How do i get unity to detect r foot pedal?

I have a thrust master ferrari racing wheel the red legend edition. The wheel is detected and works out of the box but the pedals do nothing. in the current set i have pressing up accelerates - how do ...

1
3 4
5
6 7
296