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
2 answers
102 views

Random Grid Generation with Random Density

I have a 2D grid of cells in Unity, and each cell can be on or off. I want to randomly generate the on cells, and when I just assign a probability to each cell, the entire grid has the same density, ...
Howler's user avatar
  • 171
0 votes
1 answer
69 views

3d model has this gap between head and body?

My 3D model is separated into a head and a body, but I’m encountering gaps between them. Although it appears to be a lighting issue, even after removing the material, the gaps persist. Do you have any ...
fatdrogen's user avatar
  • 238
0 votes
1 answer
56 views

Blender model imported into Unity has extra face

I created a very simple model in Blender that I exported as a .fbx and imported into Unity. After fixing normals/textures/etc, everything looks fine, except that the Unity mesh has an extra edge and ...
WillOw's user avatar
  • 3
0 votes
1 answer
46 views

UIElement button does not work when clicked

I have a small issue with my UI. Whenever I click a button on my pause menu ui nothing happens even when I hover over the buttons. However, in my main menu scene, the UI works without any problems. ...
Miracle's user avatar
  • 33
0 votes
1 answer
105 views

Weird effect during rendering pixel art in Unity

I am building a top-down 2D game in Unity engine. I have made a house on my own but when I try to render it in Unity, it shows weird effect when camera moves. See the roof of the house: I want the ...
kiner_shah's user avatar
0 votes
1 answer
44 views

Simulating the behaviour of small objects coming to rest on the surface of an asteroid, 2D

I have a large asteroid object, and I want to use physics2D to have smaller objects be attracted to it as if by gravity, and come to rest on its surface. The asteroid itself is also a dynamic ...
arcadeperfect's user avatar
0 votes
1 answer
31 views

How to add a text label to a WireSphere Gizmo?

I’ve created a few WireSphere gizmos on my scene, and I’d like to add labels to them so I can easily identify which corresponds to what variable. However, by using transform.position, the label ...
YoshGJ's user avatar
  • 495
0 votes
0 answers
43 views

Why doesn't my save system work on IOS?

I am building an IOS game in Unity. I have constructed a save system and it seems to function as expected in editor, but does not when I release a build to my device. Additionally, if there is some ...
Devin's user avatar
  • 1
0 votes
0 answers
53 views

Need advice on how to implement grass shader similar to Breath of the wild

What I am trying to achieve : I’m trying to recreate the grass shader of Breath of the wild & Tears of the Kingdom. There is a glow on the edge of the individual grass blades present when the sun/...
Abhishek Jathan's user avatar
1 vote
0 answers
35 views

Unity Text mesh pro custom Font issue

Following an upgrade from Unity 2020.3.36f to 2023.2.3f1, I've encountered problems with custom fonts in Text Mesh Pro. The texts using custom fonts aren't displaying correctly, whereas the default ...
Muhammed Fasil 's user avatar
0 votes
0 answers
30 views

How to prevent pre-launch report play store bots from affecting firebase analytics

I am following this publishing flow to send updates to the Android Play Store: I upload a new build to the Internal testing track and after testing that all's well, I'll promote it to Production. The ...
Dhiraj Gupta's user avatar
0 votes
0 answers
41 views

Differentiate between Triggers in OnTriggerEnter Unity

I want to implement a simple functionality in my Unity application: I have a water volume represented by a Tilemap with TilemapCollider2D. I have a player that has 2 triggers: 1 in the center of the ...
Arial Pilisov's user avatar
0 votes
0 answers
57 views

Destroyed object's transform is null by LateUpdate but not other components in Unity?

one of my players always, consistently get a NullReferenceException in a "will be destroyed" behaviour. No other report were sent (they are automatic). Only from that device and I couldn't ...
Tudvari's user avatar
  • 731
0 votes
0 answers
25 views

Baked lightmaps in SceneA, at runtime loaded SceneB from SceneA: lighting is now messed up in untouched SceneB. Only in Editor!

I'm using Unity, and in my MainMenu scene I made most objects static and baked some lightmaps. I built the game, clicked on a button in MainMenu which ...
Tudvari's user avatar
  • 731
0 votes
1 answer
38 views

How to meet quality standard for audio files to upload to the Unity Store?

I have some 8-bit classical music that I want to release on the Unity store, for the most part the Unity Store Submission Guidelines make sense, but for this one part that goes. 2.7.b Audio files are ...
Neil Meyer's user avatar
0 votes
1 answer
35 views

Is shader array shared with other shader or not?

The documentation for Material.SetFloatArray it states: Sets a float array property on the material. If a float array property with the given name already exists, ...
aaa's user avatar
  • 107
0 votes
1 answer
61 views

Unity Mirror AWS clients won't connect to server

My Unity project uses the Mirror Networking component and I am using an AWS free tier EC2 instance to host it. I configured the instance following this guide from the Mirror documentation, including ...
Michael's user avatar
  • 41
1 vote
0 answers
54 views

How do I make terrain flatten under gameobject in Unity?

In my game, you can build buildings. They are placed on the terrain. The problem is that my terrain is not flat, which means that when building a building, half of this building may hang in the air (...
staff's user avatar
  • 11
0 votes
0 answers
48 views

How to optimize rendering in a block game in Unity

I'm trying to developing a simple cube game (minecraft-like, without voxel). Player can instantiate Cube 1x1x1 in the world. Cube have different texture max size 512x512. When Camera look at some &...
stighy's user avatar
  • 427
0 votes
0 answers
15 views

Client error I can't spawn canvas and asign it to my client player -Netcode for Gameobjects

in my netcode unity c# code I have a host and a client, and each time i try to instantiate a client I get this error even though canvasInstance is not null since it's passing the debug ...
Jamelaumn's user avatar
0 votes
1 answer
33 views

Sawblade's spin stops or jitters when swiping to steer it

I have a 3D object, a blade, that I want to rotate continuously on the x axis, like it's cutting through something. I also want the player to control its z-axis rotation by swiping. It's mainly ...
Nader Amir's user avatar
0 votes
0 answers
77 views

Client Player not moving - NetCode for Game objects - NetworkTransform

when the host try to move it works perfectly fine, but on the client, the client player does not move ...
Jamelaumn's user avatar
0 votes
0 answers
57 views

Wake effect in games and Unity

I was curious about how wake effects are added in video games. Do most games use blender to mimic this effect and is it dynamic or does it have any drawbacks? Has anyone ever tried making it in Unity ...
Akshit Chaturvedi's user avatar
0 votes
1 answer
61 views

Canvas that should only be visible for local player is also visible for remote players

I'm using Unity NetCode for Game Objects. I have a player Prefab, inside it I have a canvas as a child of my player Prefab (I don't know if it's the best approach), which contains inventory, status, ...
Jamelaumn's user avatar
0 votes
1 answer
70 views

How to correctly instantiate a cube over another, or side-by-side another one

In a Minecraft spawn system like, I can't make works correctly following code. Specifically, if I use Code 1 it works only when I instantiate a cube over another one, not one aside other. The ...
stighy's user avatar
  • 427
1 vote
1 answer
58 views

How to call every method with a certain name from a set of classes in C#

I have the following case: I have a class called App.cs and here I have a function called Render, that runs once every frame: ...
Bogdan's user avatar
  • 111
0 votes
0 answers
39 views

Transfer ownership from one user to another not working in Unity / Photon

I'm having trouble transfering ownership from one user to another in Unity Photon. Basically one user who owns the object picks it up (enters isMine), then the ...
 d_test_2030's user avatar
0 votes
1 answer
30 views

Can we use Universal RP shaders for some objects and Mobile shaders for other objects in a Unity scene?

I am sorry if this question sounds silly. But, I am new to Universal RP shaders, and have to ask this question. Previously, in my project, I had many beautiful objects that use Mobile shaders. Today, ...
Job_September_2020's user avatar
0 votes
1 answer
86 views

How does vector raised to the power of another vector work?

I was watching this tutorial and at timestamp 3:03 he did this: This blows my mind because I didn't expect that to actually work, how the heck does that work ???? For example, if I have vector (2, 3, ...
aaa's user avatar
  • 107
0 votes
1 answer
74 views

Implement Singleton that loads before Awake

I would have liked to comment on this answer, but I don't have enough reputation so I had to open this new one. The issue with it (and with the rest of the answers) is that it doesn't work well if ...
vandermies's user avatar
3 votes
1 answer
370 views

If UV coordinate is Vector2, then why does UV node in shader graph output Vector4?

I'm new to shader, so please pardon my lack of knowledge. I am trying to understand what does UV node do in shader graph. I tried searching on google and in https://docs.unity3d.com/Packages/com.unity....
aaa's user avatar
  • 107
0 votes
0 answers
41 views

How to make 2D Customizable Pixel Animation

I’ve looked around and can’t seem to find an answer on how people animate 2D pixel sprite animation that allows for customization. Let’s use Stardew Valley as an example since it’s popular and does ...
Quick pixel's user avatar
0 votes
0 answers
41 views

How games which are made of Unity can integrate Immersive Ads?

As we are going into 2024, I'm seeing a lot of mentions regarding immersive ads. I'm just curious to know how I can implement this in my unity game.
tathagata_samajdar's user avatar
2 votes
1 answer
61 views

How to Refactor a Unity PoolManager Class for Generic Object Pooling?

I'd like to refactor my pooling class to work for more object types in my top down Unity game. Right now it's working fine for player projectiles, but I want it to also work for enemy projectiles, ...
Aloof's user avatar
  • 21
0 votes
0 answers
46 views

Red raycast despite valid target in Unity VR

I have a question regarding Unity VR and Interaction Toolkit. When I point at a UI canvas element, the raycast turns from red to white (indicating that it is a valid target). However, when I create a ...
 d_test_2030's user avatar
0 votes
1 answer
462 views

Int vs Float, which one is faster for gpu?

My game need to loop through massive amount of data, and the amount of data can increase by a lot depending on world settings set by player. The data is too big for CPU so i need to use GPU for it ...
aaa's user avatar
  • 107
0 votes
0 answers
24 views

Passing objects through scenes

I thought this would have been asked already but I could not find an answer to it so sorry if it has been asked already. I am making a VR game in Unity using the Hurricane VR Framework. Now I am ...
Alejandro's user avatar
1 vote
1 answer
228 views

Is OpenGL 2.0 possible in unity?

I want to develop a game in unity, just a small scale simple game without heavy computation nor complicated feature, and does not use a lot of ram either (2-3 GB). I want player with "outdated ...
aaa's user avatar
  • 107
0 votes
2 answers
91 views

How to instantiate correctly a cube prefab?

In a FPS i'm trying to instantiate cube like the old good minecraft. The problem is that the first cube i instantiate on terrain got y=0 but half of that cube is underground ... All my cube prefab are ...
stighy's user avatar
  • 427
0 votes
0 answers
47 views

How to prevent jarring collision resolution when enabling a ragdoll?

After enabling a rigid body and collider on an object that is overlapping with another object, it applies a large amount of force to the object, so it jumps out of the overlap. The problem is worse ...
virtouso's user avatar
  • 2,608
0 votes
0 answers
71 views

Can't start Unity project, none of the scripts load and materials are pink: JSON parse error: The document is empty

I am trying to open a project from a company, the problem is, nobody has this problem except me, so one can replicate it. When i open the project i get the following issues: There seems to be a file ...
Seyren Windsor's user avatar
2 votes
0 answers
27 views

Multi-OS/Arch NPM plugin for Unity

I need to create a NPM package containing a package for Unity. I need to use native code, i. e. a native library. The package needs to support: Windows x86 64bit Linux x86 64bit Embedded Linux ARM ...
doppelfish's user avatar
1 vote
1 answer
121 views

What specific lighting property creates "the unity look"

Nearly all unity games have specific "unity" look. It is quite obvious that it is caused by the rendering pipeline and shading, but I was wondering which specific part is responsible for ...
Tribski's user avatar
  • 155
0 votes
0 answers
45 views

Pass texture array into shader and paint mesh vertices depending on vertexattributes

Well, I'm a newbie with shaders, I'm just trying to paint a mesh depending on the vertex attribute passed with one or another texture. The idea is to achieve this, for example: For this, I have been ...
z3nth10n's user avatar
  • 141
0 votes
1 answer
70 views

Scrolling the screen left, right, up and down based on cameras rotation in Unity with C#

I'm making a building game in Unity and C# I want to be able to scroll the screen in all 4 directions when in building mode. At the moment, I can rotate the camera and scroll the screen left and right,...
Guybrush Threepwood's user avatar
0 votes
1 answer
61 views

Getting smallest possible build filesize on Win build (other than optimizing assets)

Disclaimer: I'm currently just exploring techniques and trying to save literal kilobytes just to see if I can. Please don't give me speeches about how development time is not worth it. So I got a bit ...
SurDno's user avatar
  • 41
1 vote
0 answers
60 views

Can you append values to an appendbuffer and then immediately read from that same buffer?

I am looking to achieve the following: I have a compute shader that receives a Texture2D as input, where a small percentage of the pixels in the texture are white. ...
Daniel Cardin's user avatar
0 votes
2 answers
98 views

Why is my enemy not moving?

I'm trying to make a 2D Unity platform game for a school project, but I can't seem to get the enemy to move. ...
TheEpikDuck's user avatar
0 votes
1 answer
82 views

NavMesh Runtime Generation In Specific Areas

Unity allows the runtime generation of NavMesh surfaces with the Unity.AI.Navigation package through the BuildNavMesh method. However, this function re-bakes the entire NavMesh in the current scene, ...
Alec McKay's user avatar
0 votes
0 answers
40 views

Is it possible to prevent a graphic raycaster blocking 2D rays in different layers, from a different camera?

I have a graphic raycaster attached to a canvas, with the blocking layer set to exclude all layers except "UI": ...
arcadeperfect's user avatar

1
3 4
5
6 7
328