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
80 views

What's the difference between Unity3D rendering pipeline and OpenGL rendering pipeline?

I wanted to write small software renderer that will follow almost the same flow as OpenGL does, but got stuck with understanding of the rendering pipeline. After reading tons of info across the ...
user avatar
0 votes
0 answers
25 views

Sprite is visibile through others

I'm trying to give a card game the look as if you play at a table. The effect I'm aiming for looks like this The camera used is just a perspective angled camera. The card is a mesh with a 0.02 ...
user avatar
  • 2,340
0 votes
0 answers
64 views

AsyncGPUReadback.RequestIntoNativeArray - owner has been invalidated

I have the following C# code in Unity version 2022.2.0a12: ...
user avatar
0 votes
1 answer
36 views

How to call an invoke repeating when a bool is true and canceling when it isn't?

I'm trying to make my player launch an object every 3 seconds when a bool is true but I can't InvokeRepeating in Update, ...
user avatar
0 votes
2 answers
52 views

Do a quiz from web api data

i'm new to unity and i want to do a quiz using data coming from a web api I was able to retreive data from the api but i couldn't make the game logic with them This is where i arrived ...
user avatar
0 votes
0 answers
39 views

DivideByZeroException is only thrown in Mono builds, not in IL2CPP. Why?

I'm working on exception handling and I usually test it with causing a DivideByZeroException. But this time it's not thrown. (While throwing a ...
user avatar
  • 627
0 votes
0 answers
26 views

Unity question about tilemap

So if I planning to make big location like for example Stardew Valley with tile size 32x32, should I make all map and just have it, or should I load tiles as player moves to them. I actually new to ...
user avatar
  • 3
0 votes
0 answers
22 views

Need help Slerping position and rotation for a death cam

Issue I have 2 scripts on my camera, one for following the player ( FollowTarget.cs ), and one which is supposed to, over time, Slerp the camera's transform position and rotation around the player on ...
user avatar
1 vote
1 answer
71 views

Oculus Quest: How to disable casting, video recording, screenshots

How can I disable casting, video recording (video capture), and taking photos (screenshots) when developing an Oculus/Meta Quest game. Answering my own question after spending hours googling.
user avatar
0 votes
1 answer
64 views

How to format bespoke struct, so that it appears like Vector3 in Unity Editor inspector?

I have a bespoke struct, which has XYZ variables just like Vector3, but unlike Vector3, the inspector does not display them neatly and horizontally. I have tried to read documentation and copy Vector3 ...
user avatar
0 votes
0 answers
28 views

Unity and Mirror multiplayer, how to communicate with child

If someone have knowledge on the structure of a Unity multiplayer game with Mirror, i could appreciate some help. I try to make a multiplayer shoot'em up. So i create waves of enemies. I understand it ...
user avatar
0 votes
0 answers
32 views

My tilemap is semi-transparent

I am new to Unity, and I am following the following tutorial: https://code2d.wordpress.com/2020/07/21/tilemaps/ However, my tilemap is semi-transparent. Any way to remove the transparency somehow? See ...
user avatar
0 votes
1 answer
39 views

How to rotate a sphere on its axis with a tilt?

How can I simulate a planet's rotation on the Z axis but tilted x° ( similar to how the Earth's rotation axis is tilted 23° relative to its orbit). I know with Euler angles I'll meet some gimbal lock ...
user avatar
  • 105
0 votes
1 answer
181 views

Why do some 2D games like Hollow Knight and Ori use 3D Unity instead of 2D?

What are the advantages of using 3D in Unity that you don't get with 2D? I am creating a 2D game like Hollow Knight and Ori. When would I use 3D Unity and when do I use 2D? Would the graphics be ...
user avatar
0 votes
0 answers
41 views

Reprojecting a 1024x512 texture to an equirectangular cylindrical projection

I have recently been spending a lot of time with procedural texture generation. However that quickly came to a halt when I was trying to get the textures to map to a sphere. I am required to use an ...
user avatar
0 votes
0 answers
19 views

Sorting tile unity problem [duplicate]

I have a top down Tiled map, and I would like to extract every single tile from the map and set z order layer according to the Y position they have, I have already found the way to have every single ...
user avatar
0 votes
0 answers
179 views

Making sure the player and the camera are in the borders

What I need is a way to automatically create an invisible border around the current tilemap (tile map uses simple rectangular tiles) The player character uses ...
user avatar
  • 639
0 votes
0 answers
29 views

Unity - Struggling to Get Custom Scrollbar Working

I'm Struggling to setup a scrollbar that takes two simple shapes, I don't really understand them and the tutorials I've seen use the basic scroll bars which I don't want to use. What I'm trying to do ...
user avatar
0 votes
1 answer
41 views

I have a "Floating Capsule Collider" setup, but if Collider stands on the edge of a platform, the player Mesh ends up looking 'stuck'

I have a "Floating Capsule Collider" setup, but it has an issue when the Collider stands on the very edge of a platform-- the player Mesh ends up looking 'stuck' inside of the platform. How ...
user avatar
  • 45
0 votes
0 answers
45 views

Does changing multiple sprites on a single animation affect performance?

I have been building a 2D sprite-based game for which I want to have the player be able to customize their equipment. This means that although I am fine with drawing the content, I'd need to ensure ...
user avatar
  • 101
0 votes
0 answers
17 views

Variables set in script/Unity do not work in visual studio

I was just trying to set up an array through Unity when this happened. Basically, I set the array size and values through the Unity Inspector, however, it did not register in VS. I found this out when ...
user avatar
0 votes
0 answers
25 views

Multiple cameras PostProcessing render in a different order on iOS and Android

I have a setup below: Unity 2020.2.1f1 Post Processing Stack v2 (2.3.0), Color Grading with High Definition Range, Gamma Rendering Cinemachine Camera+Brain PostProcess (Depth 0) Cinemachine Camera+...
user avatar
  • 2,502
0 votes
1 answer
29 views

Unity VR IK Rig Accurate & Dynamic Proportions For Players

Hope all is well with you! I am messing around with a game idea in Unity. I am working on getting a good IK rig going on for the player since it will be an important part of the gameplay. I currently ...
user avatar
  • 3
0 votes
0 answers
39 views

Unity Oculus Quest 2 freeze when building

I wanted to export a project directly on a Oculus Quest 2, the project works well on PC with Oculus Rift and Quest 2 in air link but when I try to export it to the Quest device, It get stuck on "...
user avatar
  • 53
0 votes
1 answer
80 views

Setting a border around a unity 2d tile map

I've a procedurally generated hex tilemap, which is larger than the bounds of the screen (when not zoomed out). What I want to do is create a border around the tilemap. The tilemap is a child of a ...
user avatar
0 votes
0 answers
54 views

Pathfinding sprite disappears when approaching the player in Unity

I'm trying to make AI for enemies in my game. I applied a pathfinding (A*) script to my enemy sprite, after which the sprite began to follow the player. But when the enemy approaches the player, the ...
user avatar
0 votes
0 answers
29 views

Need help looking into IndexOutOfRange Exception for my Audio Manager script

basically, its as the title says. I am trying to build a brick breaker game in Unity2D, and I have found myself unable to play the death sound effect (played whenever a brick breaks). ...
user avatar
0 votes
0 answers
16 views

Possible to overwrite reference type without breaking references?

I'm trying to write a system for loading a bunch of variables from disk at runtime. For a Unity game. I'm using the Easy Save plugin to serialize a parameters class. I have a wrapper class that allows ...
user avatar
0 votes
0 answers
88 views

Plot rigidbody path simulating magnus effect

I am trying to create a method that will plot the path a rigidbody will take when simulating a magnus type effect with no gravity in Unity. I realize this approach is a drastic simplification to the ...
user avatar
0 votes
1 answer
76 views

Color glitch with tilemap.SetColor() in Unity

I've been experimenting with Tilemap to display tiles (with random colors) in script with SetColor() and other methods: ...
user avatar
  • 117
0 votes
1 answer
56 views

Game Data Files security in unity

I have some game data files in PDF, excel, and video format. Is there any way to make it secure? Through encryption? I have almost encrypted my all files in .aes encryption format but there is a huge ...
user avatar
1 vote
1 answer
37 views

Configurable Joint rotation doesn't seem to respect mass difference

The Problem I've run into a physics issue in my Unity project, and have put together a simple example scene to illustrate it. Hopefully someone will be able to tell me if I'm doing something wrong. In ...
user avatar
0 votes
0 answers
17 views

Orchestrating scene flows in Unity

New to Unity and I've now completed several of their basic tutorials (2D Ruby's Adventure and Create with Code) and am having trouble seeing the "forest through the trees" on my first toy ...
user avatar
0 votes
1 answer
32 views

Why do I still get values from _CameraDepthTexture even if I didn't set depthTextureMode?

I forgot to write this C# code to enable depth from my camera: ...
user avatar
0 votes
0 answers
36 views

How to increase the size of an empty object with a "Pathfinding" component in Unity 2D?

I'm trying to make Enemy AI for my Unity game. To do this, I watch this tutorial - https://www.youtube.com/watch?v=jvtFUfJ6CP8&t=1163s. The tutorial describes how to use this pathfinding - https://...
user avatar
0 votes
0 answers
37 views

saving and retreiving parameters from file dynamically

I am trying to write a system for saving and loading a bunch of parameters at runtime. I have a central class CentralParams that holds all the parameters. Each ...
user avatar
0 votes
1 answer
37 views

How to use OnDrop on non-UI elements?

I'm new to Unity and coding (C#), so sorry if this is a novice question. Is the OnDrop function only usable for UI elements? I am currently making an ARPG Card game ...
user avatar
0 votes
0 answers
49 views

How do I control drag speed of Unity's scroll view to make it slower than mouse drag?

I'm having an issue figuring out how to make the scroll move slower than very fast mouse drags/swipes. I've tried changing the scroll sensitivity, inertia deceleration rate, and the EventSystem's drag ...
user avatar
0 votes
2 answers
75 views

How does a "static" IEnumerator work in this context? (The code works, but what is it actually doing?)

I am generating many objects procedurally in my Unity C# app/game such as user interfaces, user profiles, etc. I have made classes which feature static variables/functions to allow this. Everything ...
user avatar
  • 197
0 votes
0 answers
26 views

Problems with creating Linear Guide using Configurable joint

I'm trying to create an Linear Guide mechanism using Configurable Joint (I think this joint is better than other for this situation). I connected an orange cube to another object (let's call it frame) ...
user avatar
0 votes
1 answer
136 views

Trying to get sprite from isometric "z as y" tilemap

I'm using code like the following with a tilemap and tilemap collider 2d: var ray = Physics2D.RaycastAll(worldCoordinate, Vector2.zero); Unfortunately, when I ...
user avatar
3 votes
1 answer
116 views

Unity CharacterController steps on colliders with 0 Step Offset

I'm moving my CharacterController with the Move() method and for some reason it still steps on colliders even though its Step ...
user avatar
  • 627
0 votes
1 answer
22 views

Player object changes position when I click the pause button [duplicate]

I have a simple mobile game where every time I touch the screen, the car changes direction. The thing is, I need to implement a pause button, but when I click pause I need the car to stay still and ...
user avatar
0 votes
2 answers
76 views

How to find words on a hex grid

I am trying to make a hex grid based word game. Currently the words are placed from a list of pre-defined words(a list of animals in this case). All colored cells make a word that was placed, while ...
user avatar
0 votes
1 answer
46 views

How to round to a multiple of 0.25? [duplicate]

I have a problem when I any rational number so that it's 0.25, 0.5, 0.75, etc. ...
user avatar
  • 509
0 votes
0 answers
6 views

Unpack prefab the way materials will be editable in Unity [duplicate]

I importing models from Blender to Unity just moving .blend file to assets. I want edit materials in imported models, mostly, just set smoothness to 0.5, because, this value being exported from ...
user avatar
0 votes
1 answer
26 views

Unity Multiplayer Sync Bools

I have a little problem with syncing booleans on my networking game. I use the Mirror-Package for networking and use KCP for transport. When the players basicly collide each other (using a sphere ...
user avatar
1 vote
1 answer
59 views

Can't make simple shader transparent in Unity

I have already visited a lot of links, but non of them did not help me. I just want to make a window as a plane (face) with texture with transparency. .shader: <...
user avatar
0 votes
1 answer
24 views

rendering the position of a mesh in a shader as a color, but the color does not match the actual position

...
user avatar
0 votes
0 answers
50 views

What is the best approach for achieving DI / testability in Unity development?

Sorry for the fairly open-ended question, but I'm hoping I can get some insight on how to tackle automated testing in Unity. I've been quite surprised to not find a "definitive" approach on ...
user avatar

1
3 4
5
6 7
305