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
1 vote
0 answers
39 views

How does the Asynchronous Upload Pipeline actually work?

Unity has an Asynchronous Upload Pipeline which can upload qualifying textures and meshes to the GPU asynchronously over several frames, rather than uploading in one frame and stalling the main thread....
Kevin's user avatar
  • 5,734
1 vote
1 answer
80 views

How to manage UI sound effects?

I'm making the main menu for a small game I'm making, and when I was learning how to make buttons etc. In order to make the buttons have a sound effect when pressed and so on, I was told to add an ...
Kaiannae's user avatar
  • 113
0 votes
2 answers
101 views

Is it wrong to leave references objects in the game world like 99999 units away

It's hard for me to explain my question with an example. But essentially, I have a game with many craftable items. Each item is a prefab. Each item has many unique scripts and functions on it. ...
Frank's user avatar
  • 121
2 votes
1 answer
70 views

What does Unity do with a Prefab's Start function when it is assigned to something in the editor?

Unity C#. This is a hard question to phrase, an example explains it the best: Setup Create a GameObject called Thing. Create a script ThingScript and attach it to Thing. ...
Frank's user avatar
  • 121
0 votes
0 answers
21 views

Client side not getting called on Network object. Netcode for gameobjects

I am trying to get a menu system going for my game. At the moment most of it works. I have been working with the relay system where it gives you a code you input and connect to a hosted server. The ...
WestMansionHero's user avatar
0 votes
1 answer
51 views

How to get value of transitionDuration in C# for Unity UI Toolkit

My existing code for this task is: ...
Mfa Xyz's user avatar
  • 11
0 votes
2 answers
140 views

How would I make my water shader ripple?

I can easily make a basic water shader, and create a script that detects when something touches the water, but does anyone know how I would actually trigger a ripple in shader graph? I'm not asking ...
Pow's user avatar
  • 383
0 votes
0 answers
25 views

Detected the Mesh's Specific material under the click in unity

I have a mesh in unity which is made of several materails. Now if i click on it on a specific location of the mesh, i want to pick its selected materail. Actually the mesh itself have several ...
Muhammad Faizan Khan's user avatar
1 vote
2 answers
57 views

How to stop acceleration on AddRelativeForce Unity 3D?

I'm a very new game developer, and I was making a simple first-person script using AddRelativeForce. However, when I go forward(or any direction), I slowly accelerate instead of going at a constant ...
Donkey45's user avatar
1 vote
1 answer
83 views

How do I get a client side health bar to update? Netcode for gameobjects

I am working on a multiplayer prototype and am trying to get health bars working. It's working on server side and health is working and subtracting from client side with a network variable, however I ...
WestMansionHero's user avatar
1 vote
0 answers
51 views

Intensity bloom effect in game doesn't match scene view in Unity

I'm using post-process with the bloom effect and a custom material with emission enabled. The intensity of the effect in the scene view doesn't match the intensity in the game, as shown in these ...
Arnold Daniels's user avatar
0 votes
0 answers
36 views

How to prevent ffmpeg process from automatically exiting after decoding first frame?

I'm encountering an issue with an ffmpeg process in my Unity application. My application receives an encoded video frame every 0.1 seconds (encoded with H.265). I have a script that creates and starts ...
Lucas B's user avatar
0 votes
0 answers
31 views

Weird corkscrew rotation on my fps controller

I recently started work on a new game and was making a first person controller. However, this problem came up. My problem I played around with it and followed multiple tutorials, but none worked. ...
Donkey45's user avatar
1 vote
0 answers
36 views

Stop Jitter On Rigidbody2D From Rotation

I'm currently working on a geometry dash like game, except it is a triangle instead of a square (rubrub calls it a cube). I want it so that it rotates back to 0, 0, 0, when it is touching the ground. ...
sammyiscuul's user avatar
0 votes
1 answer
85 views

How to serialize data from C# in a non-human-readable way?

How can I serialize a C# object (class, struct, etc) to a file without that file being easy to read? Binary Formatter First I used the Binary Formatter, which worked really well, but there were a lot ...
Pow's user avatar
  • 383
0 votes
1 answer
76 views

How can I store a list of instances of different classes?

I am making a customizable save system for Unity. In my previous save systems, since they aren't designed to be modifiable, I already know what each save is going to contain. However, when making this ...
Pow's user avatar
  • 383
0 votes
0 answers
17 views

Deleting parts of a mesh within a certain color threshold

How do you delete parts of a mesh within a certain color threshold based on texture and re-assemble the mesh afterwards? Below it seems I get back a bunch of messy triangles instead of just the ...
ina's user avatar
  • 294
1 vote
0 answers
61 views

How to implement soft-body blobs that don't pass through one another

I am learning about soft-body implementations in Unity recently, and I stumbled upon the game Blob Merge 3D. It is quite an interesting implementation because the blobs do not overlap one another and ...
creekat's user avatar
  • 11
0 votes
1 answer
35 views

Error converting singles and floats

I have a custom data type I made called a point. It has implicit operators to easily convert between a Vector3 and a float[], the reason being Vector3 and Vector2 types are not ...
Pow's user avatar
  • 383
1 vote
0 answers
53 views

Why might my rigidbody Capsule be flying all over the place when a HingeJoint is created upon collision?

I hit Space to make the Capsule jump into a Cube above it. Expected results: Upon Collision between Capsule and Cube, a HingeJoint is created with the Capsule's rigidbody connected to it. Capsule ...
mango's user avatar
  • 11
0 votes
0 answers
29 views

How do you recreate a standard lit shader using custom lighting?

When using a standard lit shader the environment reflection on the material gets soft/blurry when you have smoothness at anything lower than 1 (which would be perfect mirror reflection). But when you ...
Ben Mora's user avatar
  • 417
0 votes
0 answers
30 views

Help with 2D Pixel art sizing in unity

I just got into making a pixel art platformer for fun and I wanted it to work so that I could have a scrolling parallax background and also a tile set for the actual level to be played on. I ...
Aiden's user avatar
  • 1
0 votes
1 answer
47 views

Want get rotation based on the details of four corners of a square

I got four corner points of the object which are topLeft, topRight, BottomRight, BottomLeft and are as clockwise. I want a rotation values in X, Y and Z for unity object to rotate based on the ...
Yagnik Joshi's user avatar
0 votes
1 answer
44 views

Using an InputField to enter a distance and then move an object to a location based on the input: object returns to old position

I have attached a script (1) to the InputField for ease and it displays HA changing when I alter it during run time in the ...
Stan's user avatar
  • 3
0 votes
2 answers
98 views

Calculating velocity to reach the jump height while the player presses the jump button

The height of the jump depends on how long the player presses the jump button. There are only two parameters - height and time. Gravity is constant. Let's say that the height has three units, and the ...
Demexis's user avatar
1 vote
0 answers
20 views

Is it possible to always make a trail crossing another trail on top in unity?

I have a couple objects with trail renderers. I was wondering if it was possible to make it so that when an object passes over the trail of another object, it always appears on top ? Because right now ...
Usylom's user avatar
  • 21
0 votes
1 answer
86 views

Best way to create a 2 player networked game

I've been dabbling in Unity. I learned the basics and I've created a few small games and one larger one. All of them were single player games. Now I want to create a game that's a 2 player - pretty ...
Kaiannae's user avatar
  • 113
0 votes
1 answer
38 views

how to import uv maps into unity?

Im trying to create a model using blender and import it to unity. I can import the model and get the texture working but the texture uv map is not correct. I have a uv layout map file I exported but ...
George's user avatar
  • 101
1 vote
1 answer
72 views

A-star algorithm after 2D tilemap 90-degree rotation

I am learing Unity and for now trying to implement a simply pathfinding alogorithm in a simply 2D isometric diamond-shaped tilemap. Recently I learned a way how to rotate tilemap and I already have a ...
Valeriy's user avatar
  • 13
0 votes
2 answers
83 views

Unity UI Buttons not working (not clickable)

Buttons Easy, Medium and Hard can not be clicked even though Restart Button was clickable from the start. All of the buttons have interactable checkbox on and raycast target on. Shadow panels and ...
Pablo Frank's user avatar
0 votes
1 answer
70 views

2D isometric tilemap coordinates

I am learning Unity and for now trying to rotate a tilemap using (x, y) --> (-y, x). I have created a Grid and tilemap in it As you can see my tiles are in cells of izometric tilemap. I am ...
Valeriy's user avatar
  • 13
0 votes
1 answer
58 views

Particle system won't collide with box collider all the time. Rain seeps through ceiling

I'm trying to make it rain in my game, but am having a problem with it seeping through the ceiling. I put a box collider above the house to catch the rain as it falls and it worked for a while, but ...
WestMansionHero's user avatar
1 vote
1 answer
452 views

How to ACTUALLY full screen the game view?

In Unity, you can use the maximise on play option, to full screen the game when you play it. You can also double click the tab to maximise or minimize the view. This works fine, but as you can see in ...
Pow's user avatar
  • 383
1 vote
2 answers
103 views

Building system similar to Satisfactory

I'm currently collecting ideas how to make a building and placement system in Unity. The user can place the game objects on several layers or floors, but the objects need to be on top of the objects ...
RBull's user avatar
  • 13
3 votes
1 answer
554 views

What expressions/functions are supported in numeric fields?

In the Unity Editor, we can type an expression in a numeric field and press Enter to apply the result of the expression. For example, for a float field, we can type ...
Kevin's user avatar
  • 5,734
0 votes
0 answers
62 views

Depth Map doesn't work in 2D URP

This is a further question from my last, originally I was trying to change the way the depth map is rendered per-pixel. However, through more testing, I've found that actually it has nothing to do ...
Pow's user avatar
  • 383
0 votes
0 answers
38 views

FBX file structure changed after export from blender

I have a free character from asset store. I uploaded it to mixamo and used it to create and download animation(pistol idle) I decided to change it a bit in blender(only animation, I didn't change ...
Taras Fityo's user avatar
0 votes
0 answers
58 views

What do I do when my game is rejected on CrazyGames [duplicate]

My game got rejected on CrazyGames. I think it is because of thease reasons Game is too hard The game rule is simply moving the car NEAR the flag. And beginners might just swipe the screen from the ...
Imagment Studios's user avatar
0 votes
1 answer
17 views

Unity UI Builder InvalidCastException

I am making a custom UI with the UI Builder for my scriptable object that holds some data for the AI Player. It all worked fine until I added a third slider for a new value I needed; now the object ...
Džoni's user avatar
  • 36
1 vote
1 answer
91 views

Accurate fps cap?

Simple question, how do I limit the games fps in Unity? I know there's Application.TargetFPS and whatnot, but it doesn't actually cap it. It just tries to get it. Vsync also wouldn't work, because you ...
Pow's user avatar
  • 383
0 votes
0 answers
45 views

How would you render 'water' underneath a plane having CPU deformations of 'waves' done to it?

https://i.imgur.com/GkEYhGa.gif I have a plane mesh that I am trying to make 'water' from by deforming the vertices on CPU in a 'waves' motion. (I know this is not ideal for performance). But ...
yunum's user avatar
  • 69
0 votes
0 answers
42 views

How to use Eclipse for C# scripting instead of Visual Studio?

https://discussions.unity.com/t/how-to-use-eclipse-for-c-scripting-instead-of-visual-studio/330038 "I use Eclipse IDE for Java development. I am trying to get it to work with C#, a programming ...
Hacker of Heaven's user avatar
0 votes
1 answer
48 views

Detecting Mesh Geometry Irregularities in Unity

I am trying to create a function to detect mesh geometry irregularities — for instance, the mesh possibly contains a missing face or possible normal flip problem. To detect the missing face, I ...
Muhammad Faizan Khan's user avatar
0 votes
2 answers
60 views

Can I develop games with Unity on cloud without installation?

I want to start game development, ideally I would only code with C# on Visual Studio with some Visual Studio extensions, without installing other extra software on my laptop. As Unity seems to be the ...
franz1's user avatar
  • 101
0 votes
1 answer
76 views

Why does this movement script prevent you from jumping if you're running forward (but running in other directions does allows jumping)?

This is a rigidbody-based movement script. I notice that it doesn't let you jump while you're running. This problem persists whether you are using new Input System or not (I tested both ways). Notably,...
yunum's user avatar
  • 69
0 votes
2 answers
43 views

Unity Camera snaps back to camera mouse look after lerping to a point and rotating normally. Once mouse look is re-enabled it overrides and snaps back

I am trying to get the camera to rotate towards a location and position. Which works at the moment, but once it is done and re enables the mouse look script or bool in the script the mouse look ...
WestMansionHero's user avatar
0 votes
0 answers
50 views

Why is _GrabTexture(texture of current frame buffer) always empty in my code and how do I fix it?

*I am using Unity 2021.3.29 and the built-in render pipeline. Here is a fragment shader I wrote that uses a grab pass to replicate an "average color" blend mode ...
rasputin's user avatar
0 votes
0 answers
69 views

90 degrees rotation of 2D isometric game

I am learning unity and wandering how to rotate an isometric map at 90 degrees. I have a fixed grid about 96x96 and would like to implement rotation of my game scene. Now I am wandering what approach ...
Valeriy's user avatar
  • 13
0 votes
1 answer
47 views

I'm trying to find a way to iterate through a list of game objects to find furthest object in the list. Then re iterate if path is blocked

I've got the first part of the code working. It iterates and does a check through the gameobjects to find the furthest nav point to hit. Then it calculates path to see if its valid or not. Now I'm ...
WestMansionHero's user avatar
0 votes
1 answer
49 views

How to structure this concept in ECS?

High level At a high level, I'm looking to create a galaxy exploration-style game. A number of points of interest will be selectable on the map (I'd like to aim for several hundred, but flexible and ...
Basic's user avatar
  • 1,267