All Questions
Tagged with unity or unity-game-engine
76,875 questions
0
votes
0
answers
60
views
Unity animation and sound effects out of sync
I'm trying to create a First Person Shooter (FPS) game on Unity.
I'm currently facing animation + sound effect (sfx) problems as they are not getting synced.
The shooting sound effect is getting ...
0
votes
1
answer
91
views
Unity crashes after I run my save file script
I'm trying to create a save file that save the position and speed of all objects in the scene, however when OnSave() is called, the unity editor completely freezes and doesn't seem to do anything.
...
2
votes
2
answers
68
views
Unity NGO NetworkList of struct that contains an array of struct
So I have a simple struct that contains just a FixedString32Bytes and an int like so :
[System.Serializable]
public struct SimpleDataStruct : INetworkSerializable, IEquatable<SimpleDataStruct>
{
...
Advice
2
votes
0
replies
36
views
encountered glitch while playing and hitting a spike
unity while in game mode playing my player once hits the spikes I come across a glitch like shake before it resets to start point, anyone knows how to help .
I'm building game prototype, I would love ...
0
votes
0
answers
24
views
Unity IAP 5.1.2 and StoreController Fetchproducts question
I am currently using Unity IAP version 5.1.2 to retrieve the product list from the Google Play Store. The code is written like this, but the problem is that there is no response at all—neither success ...
Advice
0
votes
2
replies
56
views
How can i rotate my player according to mouse position?
I have 3d scene but 2.5d view i have to rotate player according to mouse position and i want to move player according to wasd keys.I am using the new input system. I also want to make animations if ...
Advice
2
votes
0
replies
75
views
Best way to make a camera controller in Unity (New input system)
I am using the new input system, trying to make a decent camera controller. My current code is:
private void RotateCam()
{
Vector2 look = InputManager.look; //lookAction.ReadValue<Vector2>();...
0
votes
0
answers
53
views
Confusing behaviour of 'hover' state for Unity UI Toolkit Buttons
I have the following setup:
btn.uxml:
<ui:UXML xmlns:ui="UnityEngine.UIElements" noNamespaceSchemaLocation="../../../UIElementsSchema/UIElements.xsd"
editor-extension-...
Advice
0
votes
0
replies
46
views
How can I use NearbyConnections (as provided by Google Play Services) in conjunction with Unity to send data between players?
I've been running myself ragged trying to figure this out, since the documentation is rather sparse and the plugins are all somewhat out of date, but for a school project, I need to create a prototype ...
0
votes
2
answers
97
views
How to make a list of objects visible in Unity Inspector?
I'm trying to create sort of a weapons database for a game in C#.
I have already defined the properties that each weapon should have, so it's easy to keep adding weapons.
But I'm having a hard time ...
Advice
1
vote
5
replies
88
views
How to compare 3d directions as equidistant on both diagonal and horizontal/vertical
I'm currently using Unity (and C#) in a direction comparison system I'm currently making. For a cut down example, these are some directions I have:
{Up, {0,1,0}}, {UpRight, {1,1,0}}, {UpRightForward, {...
0
votes
0
answers
47
views
Unity Android: AudioSource.Play() works in Editor but no sound until first screen tap on device
I am building a "Virtual Human Front Desk" app in Unity 2022.3 (C#) for Android.
The app flow:
Download TTS audio (WAV or MP3) from a remote API
Convert it to an AudioClip
Play it using ...
1
vote
1
answer
115
views
Why is my Object not updating its relevant position to myHands?
I'm using a PickUpObject script where you pick up objects.
I've realised that the object, when held, does not follow relatively to myHands. Also, you can throw the object indefinitely.
For more ...
Best practices
0
votes
3
replies
60
views
Best practice for separating level meshes in Unity/Blender (ceiling and main map)?
I recently created a 3D map for my Unity game. The level is a cave, so I’m not using a skybox — the ceiling is part of the 3D model itself.
For convenience, I divided the map into two separate objects:...
0
votes
0
answers
60
views
Unity: ML-Agents training freeze with RenderTexture on Unity 6.3 LTS and ML-Agents 4.0.2 (eventually resumes)
I am training a PPO agent using ML-Agents 4.0.2 on Unity 6.3 LTS and I am encountering a reproducible long-running stall that appears to be related to visual observations via RenderTexture.
The setup ...