Questions tagged [unity]

Unity is a cross-platform game creation system that focuses on easy art pipeline process. It consists of a game engine and an integrated development environment. The game engine's scripting is built on Mono.

Filter by
Sorted by
Tagged with
0 votes
1 answer
63 views

The bottom of the player capsule collider is going into the ground box collider

The bottom part of the player capsule collider is going inside the ground collider. I am using a raycast for detecting whether the plauer is grounded; an object (sphere) that is present on the bottom ...
Sami Rehman's user avatar
2 votes
1 answer
117 views

Why does Unity have no official gameplay framework?

As a generalist developer, I have made many server and backend apps and also client-side UI apps. Most of these environments have a certain architecture. For example, in most backend apps, even in ...
virtouso's user avatar
  • 2,566
-1 votes
0 answers
101 views

How to generate levels similar to Spirit Hunters: Infinite Horde?

I am doing research on map generation, and want to know how to generate something like this area in the game Spirit Hunters: Infinite Horde: Here are the specific features I want to reproduce: Layer ...
Ahmad's user avatar
  • 1
0 votes
0 answers
32 views

How to change the locomotive status from moving in a spline to moving in the next spline when it meets the next rail?

I want to make a train that can move in a curve. I have downloaded a Train Spline Walker unity package. That package can generate a spline, and the train's locomotive will move in the spline with a ...
Duy Hạnh Trần's user avatar
0 votes
1 answer
57 views

Gaps between terrain chunks generated with marching cubes

My generated terrain chunks have gaps between them: I'm using Compute Shader and Simplex Noise from FastNoiseLite library to generate noise: ...
Daniilmp3's user avatar
0 votes
0 answers
149 views

Finding loss of angle and length due to rotation

I'm working on a targeting system for my 2d game. But I want to see the object in isometric perspective. My calculation is correct for 2d objects but it doesn't work for rotated in x axis objects. I ...
26.565's user avatar
  • 1
1 vote
0 answers
17 views

Editor script in VStudio cannot 'see' main scripts

(Notice: This is a crosspost with r/UnityHelp) When loading a custom editor script into VStudio, it cannot see the main game scripts. This is quite annoying for writing code, as you'll imagine. ...
Weckar E.'s user avatar
  • 822
1 vote
0 answers
43 views

Unity custom shader turning pink

I'm quite new to writing custom shaders. Wanted to try it out by creating a sand-standard surface shader. A problem that occurred was when I finished writing my custom shader in Unity, the material ...
Pantra's user avatar
  • 11
0 votes
1 answer
42 views

How to Constantly Apply a Force to a Rigidbody Within a Coroutine?

For my game, I am trying to write an enemy behavior script, where the enemy walks forward for 1 second, then stands still for 1 second, then walks forward, stands still, etc. To implement this, I have ...
NateBob's user avatar
0 votes
1 answer
43 views

How to make a moving GameObject push a CharacterController smoothly?

I have a GameObject called Player with a CharacterController component attached that has the following settings. Player also has a script called PlayerController ...
Magnality's user avatar
1 vote
1 answer
78 views

Reading JSON nested objects with JsonUtility

I currently have a JSON file: ...
misaochan's user avatar
  • 185
1 vote
0 answers
47 views

How to connect terrain chunks smoothly? [duplicate]

I'm generating a 3D terrain chunk based on Simplex Noise and Marching Cubes algorithm to create mesh. My chunks have global coordinates (x,y) e.g: (0, 1), (-1, 1)... Noise is generated using Compute ...
Daniilmp3's user avatar
3 votes
0 answers
58 views

How to find references to a Scriptable Object in all scenes

I'm going through the code of an open-source Unity project that uses Scriptable Objects as event channels. Currently, when I see a script raise an event (broadcast) through a SO channel, I have no way ...
misaochan's user avatar
  • 185
0 votes
2 answers
75 views

Player double jumps immediately with a single press when using new Input System

I am making a 2.5D runner game and I want to switch my input from the legacy Input Manager to Unity's new Input System package. I am facing a problem when I'm trying to implement the double jump when ...
Sami Rehman's user avatar
0 votes
0 answers
41 views

GameObject optimization in backpack behavior

I am trying to design the item part of my game. My original design was just to treat them as a gameobject and to give every item an item (or some derived) component,...
YX L's user avatar
  • 1
0 votes
1 answer
46 views

Wheel Colliders falling through ground

I have read through hours of forums and tried everything, But this issue still persists. I have attached a video showing the issue as well as all of my collider settings. Any help would be appreciated....
son goku's user avatar
0 votes
0 answers
27 views

OpenXR and valve index trigger value

EDIT updated code I've been looking for quite some time how to get valve index trigger value to be read. This is the current code ...
joonasj's user avatar
  • 101
2 votes
0 answers
55 views

How to get wave height of a gerstner wave made in shader graph?

I have followed a gerstner wave shader graph tutorial. (YouTube Tutorial) I am now trying to implement buoyancy by attaching the following script to a gameobject. (YouTube Tutorial) ...
Magnality's user avatar
1 vote
0 answers
38 views

Baked shadows look different when camera post-processing is on/off

Sooo... basically title. I have no idea what's going on here. I don't think I've seen this kind of behavior before, or perhaps I did but I can't remember it. Any idea on what's happening here? Couldn'...
YoshGJ's user avatar
  • 423
0 votes
0 answers
26 views

Uncaught Syntax Error: Unexpected token .. Doc type is not valid json error

I've a Unity WebGL game. When I try to load my game hosted on an Ubuntu 20.04 + apache 2.4 server, I get this error: Uncaught Syntax Error: Unexpected token .. Doc type is not valid json. I've ...
stighy's user avatar
  • 887
1 vote
1 answer
72 views

Character walks too fast when browser's hardware acceleration is turned off

I have posted a project on itch.io (here). My character walks with the speed I intended when Chrome's hardware acceleration is turned on but walks much faster when it is turned off. First, my friend ...
vmrfreitas's user avatar
0 votes
0 answers
30 views

How to send camera feed to Python script in Unity?

I have an image recognition code in Python and I need the input image to come from the Webcam in Unity. I've seen the Python Scripting package and the method of using a websocket and take the app as ...
Nicolas Cordoba's user avatar
0 votes
0 answers
35 views

Emulating a trail effect

I'm trying to emulate a VFX Graph trail effect I have found, however I'm having an issue with achieving a similar effect. The reference I'm using seems to use some randomness for lifetime and for ...
Sean2148's user avatar
  • 133
0 votes
0 answers
52 views

Unity Compute Shader InterlockedMin Max not work on Android

I have a Compute Shader which uses InterlockedMin() and InterlockedMax(). The Compute Shader works very well on my PC (AMD ...
Khang Dinh Hoang's user avatar
0 votes
0 answers
34 views

Verify Unity, Oculus app on server side [duplicate]

Starting with the fact that my background is non-technical, I have used a keystore with my Unity game build that is for Oculus, Rift, etc. Now I want to verify the authenticity of incoming client ...
SKB_BGPL's user avatar
0 votes
0 answers
22 views

Creating a custom input device for a DTrack wand, using both the new and old input system in Unity 2021

I am currently trying to figure out how to bridge the gap between the old input system and the new one. There is a DTrack wand that I am using, that has a package. Right now, I have a game that is ...
Riker Thomas's user avatar
0 votes
0 answers
38 views

StarterAssetsInputs OnLook is not triggering in Unity New Input System

I have StarterAssetsInputs script which based in new input system but it's onLook event is not triggering at all. Reamining functions like onSprint, onJump are working fine. But unable to find why ...
Muhammad Faizan Khan's user avatar
3 votes
1 answer
65 views

How would I generate mipmaps for a 3D texture in Unity (at runtime)?

I have been trying to create a voxel cone tracer for Unity (in Universal Render Pipeline 16). I have this (unoptimized) C# code that turns the [CubeScale] area around 0,0,0 of the scene into a 3D ...
MacksNotCool's user avatar
0 votes
1 answer
104 views

JSON Parse Error - Invalid Value

I'm trying to create a script that parses a JSON file to get information about the levels in my project. I know this technique should work because I have the same code in two other scripts, parsing ...
rpatton583's user avatar
-1 votes
1 answer
81 views

The Random.Range function isn't activating when I call it. How do I get the function to work properly and call from a range of numbers?

As you can see, I'm attempting to set the random prey integer to a number within a random range like so: randomPrey= Random.Range(0,10); As I type the code out the .Range doesn't turn yellow and the ...
Gideon Falls's user avatar
1 vote
1 answer
100 views

How do I make an interactive visual indicator in Unity?

I have a pad I interact with in my game. How do I make a visual indicator like the one shown in the attached GIF? You see that there is a circle that appears on the tablet showing where the user is ...
Craving_gold's user avatar
1 vote
1 answer
78 views

Why is HttpClient failing in Unity?

Before starting, I know I can use the UnityWebRequest class instead. The problem is that it is another library the one that is failing: NEthereum's source code, which makes heavy use of the HttpClient....
Luis Masuelli's user avatar
0 votes
0 answers
29 views

My sprite rects are flipped vertically in Unity Sprite Editor after being processed by code

I'm currently trying to process an Adobe Animate XML file with a Unity editor script, and I'm a lot of the way there, my parsing is complete, and I'm able to get some form of output, however the ...
SnowDev's user avatar
0 votes
1 answer
59 views

Car gets stuck to the ground when trying to go upwards

When I tried to go on top of the container, my car got stuck. Here is a picture of the situation: I am using 4200 for mass and defaults for drag and angular drag. ...
Mobin Bagheri's user avatar
0 votes
1 answer
41 views

How to alternate child placement to the left and right in a vertical stack?

Is it possible to arrange alternate children separately in a vertical layout group? I want to arrange the child elements so that one is aligned to the left, the next one is aligned to the right, and ...
fatdrogen's user avatar
  • 230
1 vote
0 answers
56 views

How to get OnTriggerStay2D working?

I am trying to make a flamethrower weapon for my player character. I am using a system were I can change between weapons, and every other weapon works perfectly. The flamethrower is able to turn on ...
the gibby's user avatar
0 votes
0 answers
17 views

Where did the Unity Market Insights button go in Unity Dashboard?

I'm currently trying to find the Market Insights button in the Unity Dashboard. I'm following this youtube video by Code Monkey called "Make your Game Better with Unity Analytics!" where he ...
Johnathan's user avatar
0 votes
0 answers
29 views

OnServerSceneChanged not executing

I've been trying to make a multiplayer game with mirror networking. The Network Manager works correctly when it comes to changing the scene, but the ...
koogel's user avatar
  • 79
1 vote
1 answer
66 views

VFX Graph projectile trail shows gaps

I'm learning to use Unity's VFX Graph to create projectiles. One projectile I'm working on is starting to get where I want it to be, but there's an issue where gaps are visible in the trail when I ...
Sean2148's user avatar
  • 133
0 votes
1 answer
57 views

My Update method is shown as unused, yet I'm coding within it

I'm doing a game lesson to get basic player movement working using Unity "Lesson 2.1: Player Positioning". I started with creating the public variables and getting the axis and the ...
Mila Data's user avatar
0 votes
1 answer
62 views

Camera Calibration custom Model-View-Projection matrix in Unity?

Coming from this topic I have a Model-View-Projection Matrix obtained from a Camera Calibration method, from where I want to render the scene: ...
Bontempos's user avatar
0 votes
1 answer
48 views

Can I add texture transparency and still use alpha clip in shader graph?

I have this simple shader that will "fade out" and object using alpha clip, for this to work the alpha has to be set to 0.5. I want to add a texture to this shader but I cannot figure out ...
Majs's user avatar
  • 375
0 votes
0 answers
53 views

Scene transitions to Game on host, but not on player client

I've been following Mirror tutorials on Youtube, where there was a transition between a lobby scene and a game scene, I wanted to add a loading scene inbetween them. The issue is the game transitions ...
koogel's user avatar
  • 79
0 votes
0 answers
18 views

Player sprite not showing up in game view

I'm new to game development in Unity, and I can't figure out why my player doesn't appear in-game but everything else does. This is what it looks like when running it. It's still there but it's gone:
Aidan悪い's user avatar
1 vote
0 answers
46 views

Is it Possible to use Python that is installed from the NuGet Unity Package Manager, for all platforms in a Unity game project?

Hi I've installed NuGetForUnity that is a Unity package to my Unity game project from the url: https://github.com/GlitchEnzo/NuGetForUnity/tree/master and there are so many NuGet packages are ...
1 JustOnly 1's user avatar
0 votes
1 answer
48 views

How to make enemy turn to face the player while attacking?

I need help making this code work. It is made for the enemy AI to move and patrol, chase the player and attack the player. The problem is when it starts to attack the player, then the player can move ...
Darius Van Vuuren's user avatar
1 vote
3 answers
109 views

Actual time-based plant growth even when game is off

I am developing a game in Unity, and I want a plant to grow based on actual time passed. Basically, if the player turns the game off and turns it back on one day after, the plant should be grown. I'm ...
Howler's user avatar
  • 161
0 votes
1 answer
98 views

Make night sky with moon

I want to make skybox with moon (texture 2d) with shader graph and be able to modify moon radius. Moon Texture 2d :
Ahmed Dyaa's user avatar
1 vote
2 answers
87 views

Interacting with World Space UI

Been struggling with this one for a while. I've found a few other posts across Stack Exchange and the Unity forums that seem to have the same problem, but their solutions don't work for me (at least ...
rpatton583's user avatar
0 votes
1 answer
30 views

How to start particle from skybox

I'm trying to create a lightning particle system but I want to make the top of the particles at the skybox and the bottom on the ground. Is this possible?
Ahmed Dyaa's user avatar