Questions tagged [unity-game-engine]
Unity is a cross-platform game engine by Unity Technologies. Questions should be about programming with the game engine and not usage of the graphical interface. Questions about the usage of the graphics interface are off topic.
unity-game-engine
76,914
questions
1
vote
1
answer
21
views
yield return new WaitForSeconds() not working
I have this code, but it is don`t waiting in WaitForSeconds(), only
Debug.Log("Starting hit animation");
otherAnimator.SetBool("isHitten", true);
is being completed
using System....
0
votes
0
answers
7
views
unity error CS1061 newbie gamedev tutorial not working Vector2 doesn't contain def for input
I am using a tutorial by Natty gamedev and encountered this issue in the first tutorial am using newest recommended version of unity
I am also new to gamedev and unity in general
the exact error ...
-5
votes
1
answer
22
views
How do I make 2D movement in Unity?
I am making a 2d shooter game and I am working on the movement code. When I run the game, and press WASD the player doesn't stop when I let go of a key.
I tried using Input.GetKeyDown("w") ...
0
votes
0
answers
8
views
How can I get the audio listener to follow AR/VR headset? Audio Listener is NOT moving with headset
I’m currently developing for the Apple Vision Pro, but my buddy seems to run into a similar issue on the meta-quest pro as well; I have the audio listener attached to the main XR camera in the Unity ...
0
votes
0
answers
17
views
In Unity engine, why are Quaternion & Euler angles uses different Chirality?
I experimented with a simple Unity program with 1 camera, with a tracked pose driver. The result looks like this:
When given a Euler angle of XYZ format:
pitch up <=> X decrease
pitch down <=...
-1
votes
2
answers
54
views
List<T>.IndexOf returns -1 no matter what the input is
StoredObj is a list that contains GameObjects, and ObjAmount is a list that Contains integers, in case that helps.
public void RemoveObjInv(GameObject InvObj, int amount)
{
...
0
votes
1
answer
19
views
How Can I fix the issues running Coroutine on Unity's Touch in mobile
I'm new in Unity and C#.And I have some problems. When my character moves using a 'touchmove', I used a 'weapon' to launch a 'projectilePrefab'.
However, when I actually touched and moved the ...
0
votes
1
answer
21
views
The button in Unity becomes unclickable after one use
So,basically I started to create my first game in unity 2022.3.36f1 and I started a new project. The only thing I wanted to start with was just using a "New game" button to switch from scene ...
0
votes
0
answers
27
views
OpenCV findContours() only draws round area around object, doesn't detect actual contour
I am trying to create an automatic instance segmentation dataset generator using Unity and OpenCV for Unity. Basically, the app takes pictures of objects at different angles and lighting situations ...
0
votes
0
answers
7
views
Issues with Localization and addressables
I have been working on unity project with my team, one member merged feature with git and after the merge there are some issues with addressables; almost all localization tables are not marked as ...
0
votes
1
answer
29
views
ball is losing velocity when it's supposed to speed up in unity
I'm a beginner to unity, creating a pong style game for practice. The ball is supposed to speed up every time it hits the puck but it loses velocity instead. Any fixes?
using TMPro;
using System....
0
votes
0
answers
5
views
In unity I am making a game using photon pun and need some help withe the photon hash tables
so at the start of my game everyone gets a hash table made with this line
public ExitGames.Client.Photon.Hashtable playerProperties = new ExitGames.Client.Photon.Hashtable();
that happens in the lobby ...
0
votes
0
answers
11
views
Can't see a room that was created by a player who already was in a room and then left in Unity 3D + Photon Pun
I have a public room list.
public override void OnRoomListUpdate(List<RoomInfo> roomList)
{
foreach (RoomInfo room in roomList)
{
if (room.RemovedFromList)
...
0
votes
2
answers
34
views
Object of type 'System.Collections.Generic.List`1[System.Object]' cannot be converted to type 'System.Collections.Generic.List`1[System.Int32]'
I want to write a function which can transfrom list json to variable. The GenericTypeArgument of List can be int, String, Object..etc.
eg. there has a Class Car, it has a variable "priceList"...
1
vote
0
answers
42
views
Easiest way to shoot and kill an enemy?
I would like an easy way to be able to shoot an enemy and eliminate them from the scene this is what i did. is there any other way?
public class SpawnBullet : MonoBehaviour
{
public GameObject ...