All Questions
Tagged with unity3d or unity-game-engine
76,869 questions
-2
votes
0
answers
56
views
Async Multiplayer Client Server Structure for Unity [closed]
My project is moving out of the prototype phase, and I’m trying to define a solid architecture for my game. It’s similar in concept to Backpack Battles, Super Auto Pets, or The Bazaar: players fight ...
0
votes
1
answer
37
views
How does RaycastHit2D.fraction work in relation to CircleCasts?
I'm asking because there are 2 distinct possibilities as to how RaycastHit2D.fraction works when the hit value is returned via a Physics2D.CircleCast that begins with the centre of the CircleCast ...
Best practices
1
vote
3
replies
31
views
How do I check for whether a raycast is hitting a surface normal or if it's hitting the inside of a collider?
I'm specifically using Physics2D raycasts and I want to check for this in order to prevent multiple collisions occurring around the same surface (as the raycast hit point overshoots slightly due to ...
1
vote
1
answer
48
views
Unity 3D Player movement works but Jump keybind does not
I'm new to Unity and trying to make a character that can move, jump, etc. However, the jump isn't quite working correctly. The player can move and look around perfectly fine but the jump mechanic ...
1
vote
2
answers
70
views
Automatically tie a UnityEngine.Profiling profiler sample to every method in a class
When using UnityEngine.Profiling, we can sample parts of our code in order to understand how much time and space they take up whilst running, like so:
using UnityEngine.Profiling;
public class ...
Advice
0
votes
0
replies
51
views
Magic Leap 2 - is there an equivalent to Holographic Remoting (Hololens2)?
I previously used MSFT' Holographic Remoting with Hololens 2 as I needed the resources of PC for my Unity application.
I am now developing a different application in Unity for Magic Leap 2. I was ...
0
votes
1
answer
81
views
How to mimick the compiler type cast in runtime
What I am trying to do
I need to perform implicit and explicit type casts at runtime (using Reflection) for basic types and other types that may exist in the code (known at compile time), including ...
0
votes
0
answers
55
views
WebXR + Unity build failing to render on Quest Browser after working previously
I am building a VR web app on Unity and using the WebGL platform with the WebXR export. I am not doing much special at the moment except using the WebGLTemplate HTML file to request an XR session when ...
0
votes
1
answer
114
views
Addressables doesn't unload
I'm exploring Addressables and have encountered a problem. The code shown here correctly unloads resources (the profiler shows the number of handlers is zero and the status is none):
[SerializeField] ...
0
votes
0
answers
66
views
Unity IPointerMoveHandler, IPointerClickHandler callbacks with New Input System
I'm having trouble understanding how the "IPointer" (IPointerDownHandler, IPointerMoveHandler, IPointerUpHandler, IPointerClickHandler) interfaces are supposed to work with the New Input ...
-2
votes
0
answers
49
views
LeanTween tool in Unity is not scaling or bouncing the gameobject [closed]
I have been testing the LeanTween but it not working as expected for me. I'm trying to make a bounce effect on an UI element but its not working:
LeanTween.scale(_myGameObject, new Vector3(1f, 1f, 1f),...
1
vote
1
answer
99
views
Unity Action decouple classes
I'm learning Unity to know how to avoid dependencies. I have these two classes, one that generates an event:
public class ClickController : MonoBehaviour
{
public static event Action<...
-1
votes
0
answers
116
views
List inside dictionary repeating the same element indefinitely
Note: Someone in the first iteration of this question said that CheckForMagicPoint() is being called every frame, but it is not, as checkingForMagicPoints is only set to true when someone is using the ...
Best practices
1
vote
2
replies
129
views
Naming Conventions: Manager, System. Handler or Service?
I have a bunch of background systems that do various things.
I.e:
UnitManager : holds all the information regarding all the player units in the game
SaveSystem: self-explanatory
UnitActionSystem: ...
0
votes
1
answer
98
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 ...