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
1answer
1k views

Compute shader: Property at kernel index is not set

I am trying to follow this excellent Coding Adventure: https://www.youtube.com/watch?v=lctXaT9pxA0 in order to get a very simple mesh deformation on a mesh using a compute shader. I'm getting an error ...
0
votes
1answer
237 views

Unity crashes if there are more than 4 terrains

please can you help me with the issue that I face, that is, I decided to create open-world game by creating several terrains and connect them together in Unity and firstly respective size of the ...
0
votes
2answers
60 views

How do I program procedural generation with objects that must fit together in specific ways?

I'm working on a game where I have to procedurally generate a large open room building. I'm using Unity, but I think this applies to any engine. The room is made up of different wall segments. What ...
0
votes
0answers
45 views

Render texture seems to ignore camera background type

I'm currently trying to pull a fog of war for an rts game, and planned it like this. (Unity 2020.2.7, URP 10.3.1) Use units field of view to generate a texture of what is seen (alpha 0). Create other ...
0
votes
0answers
14 views

Why is my Post Processing not working?

I'm trying to get Post Processing working in my Unity Project, with URP enabled, but I'm not seeing it work. I've looked at a few tutorials and I've followed them exactly, but I never see any post ...
0
votes
0answers
24 views

RenderPipleinManager.DORenderLoop_Internal() Taking Unusual Amount In profiler

I am developing for WebGL and for optimization purposes I have converted to URP. After converting the tri count has dramatically improved but the problem is my FPS is not improving. I tried to profile ...
0
votes
0answers
27 views

URP water showing Differently in on Runtime

I am using this water for my URP webgl build but the problem is it is showing differently on the editor. When I run the game then it showing correctly and when I build and run it in the browser then ...
0
votes
0answers
61 views

RenderPipelineManager.DoRenderLoop_Internal taking more time in URP- FPS optimzation [closed]

I have a web project on URP and i have got stuck in the problem. Here is the issue when I have profiled. Editor Profile: As you can see the culprit is WaitforSignal...
0
votes
1answer
62 views

Weird blue shine on URP Lit shader Unity

I recently started to use URP and I am noticing a weird blue like tint on shiny objects that use the URP/lot shader and I can't understand what it is and how can i remove it.
0
votes
1answer
26 views

Raycast is not restricting by other layer collider

I have converted my project to URP and suddenly I found the situation where my Raycast code even is working beneath the collider (other layer colliders): ...
0
votes
1answer
37 views

Problems blending biomes together in relation to moisture/temperature

I am trying to achieve smooth biomes blending for my procedural 3D terrain. I've been doing some research on this creating biomes topic and I found some good sources that talk about creating biomes by ...
0
votes
1answer
64 views

Why would the same script attached to multiple scenes not work the same way in some of the scenes?

I have 4 scenes in my Unity Project. And in each scene I have identical sliders, what I want to do when Advance_Trial is called via a button press, the sliders' value resets to 0. However, this only ...
0
votes
0answers
12 views

unity png sequence animation chaning position in animation

We are making frame by frame animation and we have a canvas size for animation. Attack animation is changing position in canvas. In unity after attack animation completed it teleports back to the ...
0
votes
1answer
41 views

Procedurally generated mesh makes weird shapes

I'm developping a procedural terrain generator in Unity 2020.3, using Sebastian Lague's tutorials and knowledge i've gathered through college projects. The heightmap looks just fine, and i had no ...
4
votes
2answers
3k views

color individual triangles on a mesh in Unity?

I am trying to use Unity to display a model and color some triangles on the model to high light those parts of the model. I have created a scene, with a camera, a light source and a cube. After the ...
0
votes
0answers
4 views

UI Element only showing in sceneview and not game in Unity3D

I have a game and in one part, in the start of a scene its supposed to trigger an animation that shows a UI element that covers the whole screen to make a smooth transition from one scene to another. ...
0
votes
1answer
16 views

How can I set up a 3D camera for a top-down game like Enter the Gungeon?

DodgeRollGames, the developers of Enter the Gungeon, tweeted that the game was in fact made in 3D They tried to explain how they set their camera in this reddit post. Basically what they said was : ...
0
votes
1answer
18 views

Snapping to z or x rotation values with Quaternion.Lerp

My player is a cube. I want to restrict/prevent its rotation around global y axis. I am doing this using Quaternior.Lerp since I do not want to completely constraint rotation around y axis, I just ...
0
votes
1answer
800 views

How to code dragging of objects in 3d space in Unity (Android/ iOS)?

I have been working for many hours trying to figure this out and i can't so I thought once again i'd trouble you kind folks. Basically I am trying to keep this as simple as possible so I can get to ...
3
votes
1answer
463 views

LeanTween : How to check if gameObject is destroyed?

I am trying to animate a gameObject using LeanTween which has got destroyed already. The ...
0
votes
2answers
432 views

Unity3D - Camera Jitters When Displacing and Rotating Smoothly

DISCLAIMER: I am using Unity 5.6.5f1 for this code, I honestly don't know if there would be API updates on later versions, though I don't think so. I tried to make a simple Third Person Camera that ...
1
vote
0answers
93 views

Vibration causing lag on OnePlus 6

has anyone experienced vibration causing lag on OnePlus 6 (or other device)? I'm developing a mobile game on unity and lately I have been Integrating Nice Vibrations to our game which is basically a ...
0
votes
0answers
15 views

How can I set perspective camera in portrait to fit screen sizes [closed]

I want to fit a perspective camera in different mobile portrait resolutions to see always the same objects in screen. Doing a research about my problem I have found this post Scale camera to fit ...
0
votes
0answers
16 views

RigidBody2D not moving properly

Description I've seen some Unity tutorials and I'm trying to apply good practices to modularize the code. However, I'm running into some issues while trying to use ...
2
votes
1answer
20 views

Hide/move the Particle Effect panel on the Scene view window

The problem for example is if I want to drag the particle system object to the bottom-right corner of my view, then it goes behind the Particle Effect panel. Is there any way to do hide or move this ...
1
vote
1answer
193 views

Camera follows object and has a target object on the y-axis

I have two capsule objects in a split screen shooter. At this moment, the first camera follows player one, and has the target player two. The second camera follows player two, and has the target ...
0
votes
2answers
31 views

Cubic Voxel Game, Calculate What Chunks are in the Player's View, using 3D chunks?

I need to calculate what chunks are in the player's view, meaning I need the 3D positions (the bottom, back, left corner in world space) of each chunk that is in the player's view. I'm not worried ...
1
vote
1answer
37 views

Unity 2D Driving Script Help With Camera

I am currently working on a 2D game that gives the player the ability to drive cars and get in and out of them. I wrote a script that basically gets the job done the only issue is every time my ...
0
votes
0answers
6 views

How to create a standard pbr material with shader graph?

I want to create a standard pbr material that is editable with the shader graph, but when I install the package and go the Create -> Shader tab, I only have 2 graph options: Empty Shader Graph, ...
0
votes
1answer
10 views

Intantiating objects across multiple container pages

I have this script here that generates buttons based on an array and a serialized grid transform ...
0
votes
1answer
127 views

Tetris block kinematic rigidbodies pass through one another with Transform.Translate

I am trying to build a Tetris 3D game in Unity but I am stuck at getting the different blocks to interact (to detect each other, to sit one on top of the other rather than going through each other). I ...
0
votes
0answers
6 views

Isometric grid movement UI

I am making a grid base RPG (like fire emblem but isometric) but currently is stuck on the movement mainly the ui(showing how far the player can move around the board) so stuff I have done so far ...
0
votes
1answer
19 views

How to go back to the old input system?

I have tried using Unity's new input system, but it's incredibly hard to learn, the documentation is poor, and the old system is much easier to work with. I would like to revert my project back to ...
7
votes
2answers
2k views

Displaying text on a 3D plane

I am busy with a pet project where I am trying to create a Collectible Card Game in 3D. These cards have Hp and Damage etc. but I cannot find a way to neatly display these values. I tried to use a ...
0
votes
1answer
21 views

Can I reset the `[DisallowMultipleComponent]` attribute in child classes in Unity somehow?

Can I reset the [DisallowMultipleComponent] attribute in child classes in Unity somehow? I want to create my base class: ...
0
votes
2answers
21 views

Run a Script at Game Startup in Unity

I have a script that is made to run when the game is loading. That script set the resolutions, fullscreen, and loads other screen and important settings and it applies them. I have the script attached ...
2
votes
5answers
4k views

unity JsonUtility.ToJson returns empty string

I am trying to use Unity's built in json serialization. It produces empty string. I do not understand why. (I was trying to use NewtonSoft Json.Net but that wasn't working either even though I was ...
0
votes
1answer
210 views

UI Button sprite not changing on click

I'm trying to make the sprite of my button change on click, and i used this script to achieve it: ...
0
votes
0answers
14 views

What controls the platform override codes in AudioClip (and maybe other Assets) .meta files?

My game needs to use Unity 2019.3 for the console versions, and 2020.3 for the mobile ports. The Console Project is the master project. Virtually any changes done to it are replicated to the Mobile ...
1
vote
3answers
13k views

Freeze Player position temporarily?

I'm making a 2D sidescroller (although it's technically being made in 3D), and I need to freeze a player's position temporarily. With a RigidBody, this would be simple, but I can't think of how to do ...
0
votes
1answer
771 views

Floating Boat 3D Physics Rotation from Rudder (no water resistance)

I have been able to simulate a floating boat very simply by attaching a script called Boat.cs to a ship model with a Rigidbody; ...
0
votes
1answer
18 views

Spawn point not working on unity

I have two GameObjects set down. One is named Spawn Point, and it is set at the beginning of my level, and ...
1
vote
2answers
13k views

How to play an animation backwards in Unity?

I know this question has been asked before but it all involves using the Animation(?) component, so that is no longer any good in Unity 5.3.1f1, I explain a bit more later. I'm trying to simply get ...
0
votes
1answer
722 views

How to stop a host from the client script?

I am developing a two player multiplayer game. Since its only two players, I don't want to keep my connection open if a player disconnects. Now this works well from the host side, through usage of <...
0
votes
1answer
18 views

Unity freezes when running BFS update instead of visualizing each step

I made a visualization of Breadth First Search in Unity. It consists of an area of square planes which will change color as they are visited. ...
0
votes
1answer
147 views

Play games services leaderboard does not work all the time

I am trying to login into play services. I got it working. But there were duplicate game objects created. So I added do not destroy on load and now the play services work the first time I access it. ...
0
votes
0answers
20 views

Weird “jiggly”/“warping” effect on my tiles

I need help with a problem I'm having in Unity regarding a "jiggly"/"warping" effect. It is a strange effect which occurs when I move my sprite character and makes the tiles have ...
0
votes
1answer
4k views

Strange warping/shimmering effect with Unity Tilemap and Cinemachine

I'm using a Cinemachine Virtual Camera in a 2D project to follow around a target. The ground / background is a Unity Tilemap GameObject. As you can see in the gif above (or on Imgur), when following ...
0
votes
0answers
37 views

How can I switch the default map to UI in order to pause the game?

I've recently set up the new Input System using Player Input component and invoke unity events. I just have one problem; I want to change the default action map to UI whenever I press the defined ...

1
2 3 4 5
278