29 questions from the last 30 days
1 vote
2 answers
84 views
Unity gameobject destroyed and returns "null" but still returns "obj == null" as false
I have a class for lists called UniqueListWithActions<T> with the constructor method public UniqueListWithActions(List<T> _list) { list = _list; } list is declared as ...
Best practices
0 votes
4 replies
107 views
How to properly implement target requirements in game?
I'm a self-taught beginner learning through trial and error. I'm working on a card game in Unity (C#), and I'm trying to design a clean and extensible system for validating targets during gameplay. ...
1 vote
1 answer
124 views
VS Code doesn't Recognize Unity Classes
For two days now, I've been having a rather strange problem. The MonoBehaviour class isn't recognized by VS Code, with the following error: Error while loading [...]: Exception thrown: System....
Best practices
0 votes
3 replies
68 views
How to not write a Firestore Converter for each type. (Firestore + Unity / C#)
I am using Firestore and Unity, I want to be able to serialize a Unity class, say Vector2Int so I write a Vector2IntConverter(FirestoreConverter<Vector2Int>). When I upload my DTO, say: [...
-7 votes
0 answers
77 views
I can't move while jumping in Unity [closed]
using UnityEngine; public class PlayerLocomotion : MonoBehaviour { PlayerManager playerManager; AnimatorManager animatorManager; InputManager inputManager; Vector3 ...
0 votes
1 answer
72 views
Prefab type mismatch
I have tried for days to troubleshoot but only met with persisting Type Mismatch. I am working on a flappy bird game and i wanted to make the pipes go faster as the score increases so i made a [...
0 votes
0 answers
74 views
Counteracting recoil without moving return vector
I've implemented basic FPS recoil (code shown below) and currently, the player can counteract the recoil climb by pulling the mouse down, but when the recoil returns to zero, the player view is at a ...
Advice
1 vote
1 replies
49 views
Looking for a better way to handle animation trigger calling in Unity using a Blend Tree and object instantiation
I'm fiddling around with a 2D side-scroll game using C# in Unity. Basically, I have a method that gets called when I hit an animation trigger on the animator and that method instantiates a GameObject (...
0 votes
1 answer
82 views
Firebase causing Unity Android build to fail
====== cocoapods-1.16.2 Unity 6000.0.41f1 Firebase 13.4.0 OSX 15.5 ISSUES: Android: not building > Could not resolve all files for configuration ':launcher:debugRuntimeClasspath'. > Could ...
1 vote
0 answers
68 views
nea game doesn't allow me to present and click on sprites
I'm creating a game for my nea and I have tried multiple times to make me as a user of the game to press on documents that my character presents, and to be able to interact with it. I have checked ...
0 votes
0 answers
62 views
Mobile game Test version is not visible on any android device. ( Unity- Android)
I recently started working on a Unity mobile game (Android). I upload my builds to Google Play Console for testing and share the test link with my testers. They can install the app from the Play Store ...
-6 votes
0 answers
69 views
Understanding CPU vs GPU Time Distribution in Unity [closed]
I'm trying to check whether my understanding of how Unity distributes work across the CPU and GPU is correct. Below is the simplified model I'm working with: The CPU runs gameplay scripts, prepares ...
0 votes
1 answer
79 views
Pause menu not appearing when pressing ESC
I'm trying to do a pause menu that opens when you press Esc but it isn't working, I don't know why. The pause menu object has been asigned to Pausemenu using UnityEngine; using UnityEngine....
-1 votes
0 answers
53 views
HLSL URP 17.0 PBR functions do not render light
Unity provides their PBR lighting function with UniversalFragmentPBR, and UniversalFragmentBlinnPhong, but for me, it doesn't seem to render the light. I have been following a couple of books on ...
Best practices
1 vote
2 replies
51 views
Finite State Machine for different enemies
I’d like to ask about best practices for using a finite state machine to handle different enemy behaviors. I already created a state machine for my basic enemies with the following behavior: ...