76,993 questions
0
votes
0
answers
38
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
39
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 ...
1
vote
2
answers
73
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
...
0
votes
0
answers
62
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
48
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:
...
0
votes
0
answers
20
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 ...
1
vote
0
answers
63
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 ...
-6
votes
0
answers
68
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 ...
-3
votes
0
answers
50
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
1
answer
110
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....
-1
votes
0
answers
47
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 ...
0
votes
0
answers
61
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 ...
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 ...
1
vote
0
answers
46
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 ...
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
1
answer
81
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 ...
-2
votes
0
answers
27
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 ...
Advice
1
vote
1
replies
48
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
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 [...
-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 (...
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 ...
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 ...
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 ...
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....
Best practices
0
votes
4
replies
106
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.
...
Advice
1
vote
0
replies
75
views
Text-to-Speech function in a 3D Unity game
I am doing a 3D game using a Unity, and I need my NPC can communicate with the players with voice
I want my NPC can speak with a voice that response is generated by the LLM, so the response will ...
1
vote
1
answer
88
views
Saving Movement Data as a CSV File in VR Headset (C#/Unity)
I'm working on a project where I want to collect movement data (X/Y/Z position and rotation) from a VR headset (a PICO Neo 3 Pro Eye) using a C#/Unity script, and export it as a CSV.
I have a script ...
-1
votes
0
answers
66
views
OnMouseDown() not working — object not destroyed on click [duplicate]
I created a square GameObject named "Target" and added a Box Collider 2D component.
Then I wrote the following C# script:
using UnityEngine;
public class ClickToDestroy : MonoBehaviour
{
...
0
votes
1
answer
111
views
I can't figure out why the enemies are spawning outside the rooms
I've been trying to fix this issue with my code for a while now but I can't seem to figure it out. For some reason, the enemies can still spawn outside of rooms, but they won't ever spawn outside of ...
0
votes
1
answer
107
views
I need help fixing this crouching bug
I'm currently struggling to understand why the crouch mechanic isn't working all that well in unity. I would be grateful to anyone who can help me understand why this code doesn't work and how can I ...
2
votes
1
answer
80
views
Tracking a button works once, but when I click it a second time, nothing happens
In Unity, I have an idea for a simple game where, if a child object collides with an object tagged "wall" and presses the W button, the parent object moves towards the collided object. ...
2
votes
0
answers
77
views
FMOD Error in Build: "Cannot create FMOD::Sound instance" - AudioClips Fail to Load (Works perfect in Editor)
I’m currently developing a Full Motion Video (FMV) game which, by its nature, contains a very large number of video and audio clips. I’ve encountered a critical issue that only appears in the built ...
0
votes
1
answer
94
views
unity android dependency resolver is stuck at 0%
image resolver is stuck at 0%
Running Gradle...
E:\game project\spaceFighterMobile\Temp\PlayServicesResolverGradle\gradlew.bat --no-daemon -b "E:\game project\spaceFighterMobile\Temp\...
2
votes
1
answer
77
views
Assembly-CSharp not loading when I open my Unity scripts written with C# in Visual Studio 2022
When I open my Unity scripts in Visual Studio 2022, I am greeted with this error:
I tried deleting all .csproj files before opening in VS and also tried reinstalling VS and Unity. The file being ...
1
vote
1
answer
99
views
PlayerPrefs won't update between simultaneous players
I am currently developing a WebGL app with Unity and using PlayerPrefs to try and make it so that a unique user id is generated for a player and used to connect to a remote lobby system.
The problem I'...
0
votes
0
answers
43
views
iOS Widget Extension Provisioning Issue with Unity Cloud Build
I have a Unity package that creates a iOS widget extension with its own Bundle Identifier. Everything builds and runs correctly when I build locally from Xcode, but when I try to build using Unity ...
2
votes
1
answer
141
views
How to query Firebase Realtime Database for top N users and current user’s rank
How to index Firebase Realtime Database for leaderboard and get current user’s rank?
I’m using Firebase Realtime Database to store user data for a game. I want to implement a leaderboard based on the ...
0
votes
0
answers
121
views
How do I construct an Il2Cpp string?
Using Il2CppDumper, I have dumped my files and am perusing the methods and their arguments using dnSpy. Some methods take string arguments like this one:
[Token(Token = "0x6000338")]
[...
0
votes
0
answers
60
views
Rigidbody not moving on start even though capsulecast not detecting anything
I want to implement basic movement using a rigidbody but my player at the start of the game cant move using WASD and can only jump and shift. When they shift, they slide to the side a bit before WASD ...
0
votes
0
answers
34
views
Android project using untiy-classes.jar (generated by Unity) with some classes that can't be resolved
I work on a small android project that uses the unity-clases.jar generated by Unity. Some (not all) of the files/classes in the .jar can't be resolved when compiling the android project and I don't ...
-4
votes
1
answer
80
views
Unity 6 keeps giving me error from cs.meta file [closed]
Unity keeps giving me error from cs.meta file to change the language version from c#9 to c#10 or greater because of feature "global using directive", how should I change the version or what ...
0
votes
1
answer
102
views
Make a floating point origin in unity
I created this code in Unity to only move the object in my scene if the threshold is exceeded, but it does not set my tracking object, and continues to snap to it. My tracking object was a rigid body ...
0
votes
0
answers
65
views
How to check if gameobject with Rigidbody and a Physic material doesn't move in Unity3d in C# in another script?
game engine : Unity3d 2021.3.17f1.
programming language :C#.
Windows 10
Hello, I create a football like game in Unity 3d. How do I check that a game object with a Rigidbody component and a Physic ...
0
votes
1
answer
84
views
VLC for unity trial version, the type or namespace name 'LibVLC' could not be found
I'm trying to test the free trial version of VLC for Unity, the package was downloaded here https://videolabs.io/store/unity/
I imported the downloaded "vlc-unity-trial-v6.unitypackage" in ...
1
vote
1
answer
77
views
Bluetooth LE Device Connects Then Immediately Disconnects on First Attempt
I'm developing a Unity application that connects to custom ESP32-based Bluetooth LE joysticks on Android. I'm experiencing a consistent pattern where the first connection attempt fails with an ...
1
vote
0
answers
56
views
Cinemachine follow camera stuttering if the target object to follow rigidbody gravity is disabled. how to make the camera follow smooth?
when using gravity, it's working fine the camera is following smooth.
when gravity is disabled, the camera is stuttering. and i tried in the Rigidbody to set the Interpolate property to Interpolate ...
0
votes
0
answers
66
views
Unity Fusion Network Transform Jitter
I'm making a multiplayer game using Server/Client mode in Photon Fusion 1 in unity where players dogfight with their planes.
Now the issue I'm facing is when I attach Network transform component on ...
0
votes
1
answer
51
views
Can't use DOTS in unity 6.2
I wanted to study using ECS for a new project. But after I imported them using the git urls provided by the official site, i ran into some error messages:
here are the packages i have:
I have ...