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
78
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....
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:
...
-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 ...
1
vote
0
answers
58
views
Displaying a coordinate grid and markers on the globe in Unity
Please help me with the Earth model in Unity. I don't understand what's wrong.
I downloaded the blue marble texture from the NASA website, attached it to a Material, and placed it on a sphere.
I want ...
-3
votes
0
answers
52
views
unity error CS0117: 'TcpListener' does not contain a definition for 'Queue' [closed]
Library\PackageCache\[email protected]\Editor\Messaging\Messenger.cs(164,30): error CS0117: 'TcpListener' does not contain a definition for 'Queue'
How do i fix this?
1
vote
0
answers
47
views
How to check for possible collisions using gizmos
I am making a clone of the game "Arrow Out." I am not sure if this is even the correct way but I am thinking of using gizmos to check if there is another arrow in the path of the clicked ...
0
votes
0
answers
57
views
How to make a player stick to a planet while moving?
I actually make a game about a space explorer but i've enconter a problem. When my player hit the ground (or when he spawn on the surface) he slide on the back of the planet. How can i actually make ...
0
votes
0
answers
64
views
Unity - Libraries of ARM64 not supporting 16 KB page size
I’m currently testing my Unity project for Android 15 compliance (Google Play requirement for 16 KB memory page sizes).
After upgrading to Unity 6000.0.62f1 (which claims to support 16 KB page size by ...
0
votes
0
answers
46
views
Vuforia 11.3.4 error — ARTrackablesChangedEventArgs not found when using AR Foundation 5.2.0 (Unity 2022.3)
I’m working on an AR project in Unity 2022.3 using Vuforia Engine 11.3.4 and AR Foundation 5.2.0.
When I try to build or play in the editor, I get the following compile error:
Library\PackageCache\com....
-3
votes
1
answer
32
views
Unity initiate issues
In my Unity Project when my game runs my world item prefab initiates sprites that don't show on my inventory display only the canvas that can't be seen on screen and it doesn't spawn any collectable ...
0
votes
0
answers
37
views
Unity 6 - Android - HTTPListener
I am trying to create an HTTP listener in my game application to be run on Android.
I have created this script that receives API requests from the network and do some stuff in the game.
using ...
-1
votes
1
answer
45
views
Unity UWP build: “A scripted object probably BlankScene has a different serialization layout” when using [SerializeField]
I'm encountering a serialization error when building a Unity project for UWP and running it in Visual Studio:
A scripted object probably BlankScene has a different serialization layout when loading (...
Advice
0
votes
1
replies
23
views
Unity webgl url
I have a question: how can you make a product in Unity format that has, for example, dmg hp cirt-dmg
and each weapon has an icon, but I want to put either an icon or a video on the weapon?
I have a ...
-1
votes
0
answers
18
views
Nea 2d game on unity need help to present interactable sprites and make words appear when typing
In my previous post, I didn't add many details and wasn't able to get effective help, so here I go again.
I am currently creating a 2d game inspired by both papers please and not my neighbour at the ...
Advice
0
votes
2
replies
46
views
Better AI Behaviour
I am currently working on AI Behaviour in a Beat-Em-Up game in Unity for my beat-em-up project, I am currently using my own statemachine system (with states that don't inherit from monobehaviour) to ...
0
votes
0
answers
24
views
Can't select a TextMeshPro Input Field on ChromeOS builds
I have a TextMeshPro Input Field component that works fine in the editor. However, when building to a Chromebook, if I select it, it immediately deselects itself and I am not able to type in it (at ...
0
votes
0
answers
41
views
Google Signin with AWS Cognito
Our games built using Unity, use Google Play Games Services v1 to support Google Signin. Once the player is signed in, token is obtained using:
token = PlayGamesPlatform.Instance.GetIdToken();
and ...