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
31 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
1 vote
1 answer
155 views

Intellisense broken after installing Unity VSCode extension

I didn't use VSCode since two weeks ago. Today, I opened my Unity Project. VSCode updated some extensions and unhappily, Intellisense doesn't work anymore. I didn't change VSCode settings — all ...
Achie1's user avatar
  • 169
2 votes
1 answer
71 views

Why does volumetric fog require two checkboxes?

In the Unity High Definition Rendering Pipeline, when adding Volumetric Fog, there's a checkbox to enable the Volumetric Fog, and then there's an additional checkbox to the right of it that also has ...
Sean Duggan's user avatar
0 votes
2 answers
48 views

How to keep an object that rotates around another at the same height when the radius changes?

In my game, I have one object that rotates around another using transform.RotateAround, and I need to change the radius of its orbit. The behavior now is that the ...
Oled Neduda's user avatar
2 votes
0 answers
45 views

How should I go about making "tutorial hands" to show users how to interact with objects?

I'm making a game in which players will need to interact with several types of controls (switches, knobs, etc.) in various different ways. For part of the tutorial, I want to show them how to interact ...
Cipherix's user avatar
0 votes
0 answers
28 views

Is there any way to store values in vertex shader such that they can be used in the next frame?

As I understand, the values assigned in the vertex shader aren't persistent and storing them doesn't do anything. I want to store the MVP matrix in another variable to be used in the next frame. ...
Nikhil Nair's user avatar
0 votes
0 answers
53 views

Changing the default 1 Unit = 1 Meter to 1 Unit = 1 Yard in Unity

I am working on an augmented reality project in Unity using MRTK and have just found out that one Unity Unit is equal to a meter in real life. Unfortunately my project needs to be in yards. My current ...
Dylan Levine's user avatar
0 votes
0 answers
53 views

GameObject getting stuck on wall

I am making a simple character controller. Whenever I continuously walk into a wall, gravity just stops working. For example, if there is a wall in front of me, and I jump and walk into it while in ...
kalilamodow's user avatar
0 votes
1 answer
56 views

How can I store the current frame's MVP matrix (Or any other data about the current frame) so that I can use it in the next frame?

I've read several articles about motion blur and all were made with OpenGL. There is no equivalent of MVP matrix in C# scripts, so I wondered if the data could be stored on the GPU itself. Is it ...
Nikhil Nair's user avatar
0 votes
0 answers
44 views

How to fix the flag bool variable become null and never stop the coroutine?

The script is attached to some objects and in another script when checking distance, I'm starting the blinking and then should stop the blinking. but it's never got inside the stop method because the ...
Shelly Ron's user avatar
0 votes
1 answer
147 views

Make moon using cubemap in shadergraph

I'm trying to make moon with a cubemap texture in shadergraph. I made it, but the texture is incorrect. I'm using a cubemap from NASA as a texture and it works, but it's bigger than moon shape and ...
Ahmed Dyaa's user avatar
1 vote
0 answers
72 views

I don't want my plane to go trough walls, I want it to stop on obstacles

I'm currently working on my first Unity Learn code challenge, making a Flappy Bird style game where a plane needs to fly through gaps between wall obstacles. I've successfully implemented all the ...
Mila Data's user avatar
0 votes
0 answers
41 views

Toggle isKinematic on Rigidbody re-triggers collision

Apparently since 2019 you cannot toggle isKinematic without re-triggering the collision. How am I now supposed to push back NavMesh Agents? It used to be you could disable agent, set kinematic to ...
Majs's user avatar
  • 375
0 votes
0 answers
29 views

How to make each waypoint individual blinking colors when the camera is reaching the waypoint?

The main goal is to make each waypoint blinking by changing colors when the camera is reaching the current waypoint. The script and post are a bit long so I will put the whole script and then explain ...
Shelly Ron's user avatar
0 votes
0 answers
68 views

A* implementation does not work correctly

I'm trying to implement a 3D pathfinding system based on the A* algorithm. This tutorial served as the starting point for my implementation. I tried to remake it for pathfinding in three dimensions, ...
Ilya's user avatar
  • 11
0 votes
1 answer
58 views

Cubemap rotation

I have a skybox with stars cubemap So, how can I rotate stars cubemap on Z axis using "Rotate About Axis"?
Ahmed Dyaa's user avatar
1 vote
1 answer
79 views

How to get materials from objects?

...
Shelly Ron's user avatar
4 votes
1 answer
85 views

What are good ways to make modular corridors and interiors of buildings?

I would like to make modular corridors and some other objects in my level, to make it easier to construct them. Do I separate walls, floor, and ceiling or make a tube module? How to avoid seams ...
V S Vuca's user avatar
0 votes
1 answer
165 views

Unity Burst Compiler failed — could not load System.Diagnostics.Tracing

I am using Unity 2023.3.f1 When building an Android app I get the following. I have zero idea what this means. I've tried searching elsewhere but found nothing to fix it. ...
theblitz's user avatar
  • 123
0 votes
1 answer
65 views

Store and call multiple functions consecutively

I am looking to create a "stack" of functions that I can call at will. In my game, multiple events can trigger at the same time. These things should not be shown at the same time however, ...
Davy's user avatar
  • 103
0 votes
0 answers
50 views

Permanent blood spots

I want my blood decals to stay on the map until I'm done in that zone, which is probably 5 minutes. The issue is that at the moment, I spawn 1 blood decal at each particle collision, so after killing ...
Green_qaue's user avatar
  • 1,873
0 votes
1 answer
42 views

Why is rotationAngle not taking effect when changing it in the inspector?

I want to make it so that, when I'm changing the rotationAngle Range slider in the inspector at runtime, it will change the transform rotation angle, but it's not ...
Oled Neduda's user avatar
0 votes
0 answers
54 views

Skinned Mesh Renderer - In Unity I can't change the blender modified mesh

I downloaded two assets from the Unity store, with the first one I built a modular character (head, torso, legs), then I took another one from the same author, to have more body "modules", ...
Baro's user avatar
  • 119
0 votes
0 answers
17 views

Xcode gives plenty of Undefined Symbol: Firebase_App error

I Build my Unity project to Xcode, trying to install it on ios device. It gives errors like as follow ...
Muhammet Demir's user avatar
0 votes
1 answer
62 views

Persistent save value, event after deleting savefile

Now, I now the title is really obscure, but I have tried to solve the following problem for so long and most of it is integrated into my game so far that I can't just copy & paste it here, so this ...
Felix193's user avatar
0 votes
1 answer
42 views

When switching between two scenes: MissingReferenceException: The object of type '...' has been destroyed but you are still trying to access it

I recreated the problem in a new project to check and test the problem, but I don't understand it. Two scenes: First scene A GameObject with this script that simply jumps to the second scene. ...
Baro's user avatar
  • 119
0 votes
0 answers
24 views

In Unity, how do I get a specific texture in runtime from .psd file rather than its whole entire texture?

I'm trying to recreate the current texture on a SpriteRenderer's sprite in order to make it bigger so that I can add a white outline to it. This is all done on runtime. If we look at the .psd file ...
rain walker's user avatar
0 votes
1 answer
99 views

How can I make this Worley noise generator more efficient?

...
Nikhil Nair's user avatar
0 votes
0 answers
21 views

Lighting reacting wrong on object

Long story short, A and B are the same object just rotated 180 The area light is for some reason also "flipped" I tried playing with the generated lightmap and turning it off, changing ...
Shenechoe's user avatar
0 votes
0 answers
29 views

How to allow a Rigidbody to pass through another Rigidbody without stopping OnCollisionEnter from working

so im using Unity and im aware of the Physics page but it does make the Rigidbody pass through each other but it does not trigger OnCollisionEnter how can make it so the Rigidbody pass through ...
Troyy_'s user avatar
  • 1
0 votes
1 answer
36 views

GameObjects loaded from OBJ files have inherent position offsets; any way to measure these in worldspace?

I have OBJ files that I'm loading into my scene at runtime. They all have positions offset from zero. These positions appear to be inherent to the .obj file as they were set in the 3D modelling ...
A__'s user avatar
  • 143
0 votes
0 answers
19 views

PolygonCollider2D components do not work properly in iOS build

I'm trying to figure out why my polygon colliders default to pentagon shapes when I build my app and test it on a device. I have a scene with some blocks you can drag around where the colliders work ...
KD867746's user avatar
0 votes
1 answer
41 views

Why doesn't RectTransform.GetWorldCorners() employ any camera?

Typically, conversion methods from world to screen coordinates and vice versa use a camera to perform these calculations, so I'm wondering how does GetWorldCorners ...
Serg's user avatar
  • 353
1 vote
0 answers
36 views

How to know when should a webcam/phone camera refocus?

This is the code I use to display the camera's footage inside my app: ...
Tudvari's user avatar
  • 711
0 votes
1 answer
68 views

How to use WASD to move camera between a collection of position marker objects?

How can I move one camera between two positions along the cardinal directions? Using W/A/S/D keys, I want to move the camera from one empty object to another on the xy plane. Those empty objects ...
nausikaa's user avatar
0 votes
0 answers
37 views

How can I clearly distinguish between tap and swipe inputs on mobile?

How can I clearly distinguish tapping and swiping touches? This is my interaction script: ...
Byungheon Lee's user avatar
0 votes
1 answer
89 views

Problem with JSON ScriptableObject saving using NewtonSoft JSON

I am saving a list of ScriptableObjects in a JSON file using NewtonSoft JSON, the problem being that the following error message is thrown when it tries to save: <...
Felix193's user avatar
0 votes
0 answers
65 views

"rigidbody property has been deprecated" when trying to save ScriptableObject to JSON with NewtonSoft

I am using NewtonSoft Json to save data in my Unity game, but when I try to save something it get this error: ...
Felix193's user avatar
0 votes
0 answers
61 views

Add private GitHub repository in Unity Package Manager

Is there any way available to use a private Git repository directly in a package manager? Currently, I have made a package and hosted it on GitHub. Now, I want to use it directly from GitHub in Unity. ...
Muhammad Faizan Khan's user avatar
0 votes
1 answer
65 views

Rain particle system scale

I'm using a rain particle system and using cone a radius to scale it. My question is what is the best way to make the rain particle covering the entire map? And does increasing the rate over time ...
Ahmed Dyaa's user avatar
0 votes
0 answers
32 views

Physics2D.OverlapBoxAll misses small overlap

I have a tetris-like 2D game with tiles, each made up of a sprite, a Rigidbody2D and a BoxCollider2D. The tiles fall from the ...
ChrisC's user avatar
  • 116
0 votes
1 answer
47 views

Physics.OverlapBox not detecting 2D collider objects

I have a 2D game with several square objects (tiles) that each have a BoxCollider2D and a kinematic Rigidbody2D. I want to detect when one tile is located to the right of another tile, such as to ...
ChrisC's user avatar
  • 116
1 vote
0 answers
79 views

Tilemap vs terrain vs optimized mesh for top-down game

I'm experimenting with a top down vertical scroller in Unity, with a perspective camera, NOT orthogonal. (It's unclear how 'pixelated'/pixel art I will want the graphics but that's another question) ...
James Carlyle-Clarke's user avatar
0 votes
0 answers
18 views

ComputeShader.SetTexture() isn't writing to the shader

The C# script: ...
Nikhil Nair's user avatar
1 vote
1 answer
36 views

Move object continuously along y with optional movement along x

I am looking for a sensible way to continuously move an object downwards with constant speed while moving left or right by some amount x when the user presses the left or right arrow keys. Basically, ...
ChrisC's user avatar
  • 116
1 vote
0 answers
31 views

How to create intersection shader that simulates squishing?

I want to create a shader that will make spheres/circles look like a blob when colliding. I don't understand shadergraph at all, but I tried to follow intersection shader tutorials. The problem is ...
Pinet's user avatar
  • 11
1 vote
1 answer
34 views

Unity vs Unreal Engine [closed]

I am beginner in VR development. Which game engine is better between Unity and Unreal Engine? I am thinking to pick Unreal Engine as it has better graphics. Do you think in the future, Unity will have ...
Florin Caroli's user avatar
3 votes
2 answers
97 views

How to check if player actually went through a trigger area and didn't just touch it?

I'm trying to make a racing game that measures your distance from the center-line of the road. To do this I need to check on which part of the road the player is, so the calculation is correct. (If it ...
SirResnick2's user avatar
0 votes
0 answers
23 views

How to make action get triggered as long as key is held in Unity new input system

I'm using unity new input system for a local multiplayer game. My PlayerInput sends messages to my CharacterInputListener on every character object, one of such messages is OnDefend(). I want ...
Alakanu's user avatar
  • 705
0 votes
2 answers
102 views

How does a bot know who is an enemy?

How does a bot know who is an enemy if "enemy" encompasses not only one player, which can be just hardcoded? For example, in Warcraft 3, we can have two bot teams with faction alliances and ...
Taras Fityo's user avatar