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.
16,744 questions
0
votes
0
answers
144
views
How do I add an outline to a Unity tilemap?
Is it possible to add a nice outline to a unity tilemap?
For example, if my tilemap looks something like the image on the left, I want to make it render like the image on the right:
I found this ...
0
votes
0
answers
60
views
Is there a way to prevent probuilderize deleting faces?
I have used Probuilder to "probuilderize" the interior of a building however when I do this faces get deleted all over the model. I know it is definitely Probuilder causing this as when I ...
1
vote
1
answer
221
views
How to delete prefab variants?
I am having trouble deleting a prefab variant from the project panel. I have removed the single instance of it I had in a scene, but when I try to delete it from the project panel it deletes and then ...
1
vote
0
answers
122
views
Creating a large number of GameObjects asynchronously
I am creating a 2D procedural terrain using many Tile GameObjects. To make this infinite (and more performant), I dynamically load and unload chunks based on the players position and a variable ...
0
votes
0
answers
47
views
Is there a fix for "maximized window" bug for unity game engine versions before 2023?
So the "maximized window" bug was fixed in one of the 2023 versions of Unity. Previous versions have this setting bugged so setting a project to use "maximized window" results in ...
1
vote
0
answers
66
views
How to add dirt/ground variance to the bottom of my mountain/platform in Unity?
I have a cliff in my game. Currently it sits on flat grass, but I want to add more depth to the visuals. I've added ambient occlusion to the pipeline and it has helped a lot. However, what I really ...
0
votes
2
answers
93
views
Get the path of a sprite without UnityEditor.AssetDatabase
How can I get complete path of a sprite? describes how to get a sprite path using UnityEditor.AssetDatabase which isn't available in builds. I need a way to get the ...
1
vote
1
answer
135
views
Is there a way to filter/search only the children of a selected gameobject in the hierarchy panel?
I'm not sure if there's a setting or wildcard I'm missing, but when I search in the hierarchy panel the results are presented in alphanumerical order with no reference to the hierarchy of the ...
0
votes
0
answers
134
views
My car keeps flipping over (or drifting uncontrollably)
I am experimenting with 3D car physics in Unity and want a good car for a racing game.
I've been trying to implement turning (and drifting) for this car. I want the car to automatically drift at high ...
1
vote
1
answer
65
views
How to make tiling properties work with additional texture slots in a Unity Surface Shader?
I have created a custom shader based on Unity's standard surface shader,
but tiling and offset properties don't work at all.
Only the albedo texture slot's tiling works.
How do you make tiling work ...
0
votes
1
answer
123
views
Can LOD Groups be used for gameobjects that don't have a renderer component?
I am trying to work out how to use LOD Groups with interactive gameobjects. As a simple example lets say I have a prop which when the player is a certain distance away it plays a sound. The problem I ...
3
votes
0
answers
139
views
How to achieve a procedural/modular dirt path like those in The Last Campfire?
I’ve played The Last Campfire recently and got really inspired by it, so I’m trying to recreate some scenes from the game just to improve my 3D art skills.
But there’s one thing that I’m a bit lost.
...
2
votes
1
answer
146
views
How to plan the animation of a complex combat between two groups of units?
I'm working on a turn-based tactics game in Unity3D/C# in which players control Detachments composed of multiple Units. Each Detachment occupies one hex on a map, and may contain up to one each of ...
2
votes
0
answers
137
views
How to prevent glitches in script-driven animations?
I have animations that are played via script. Occasionally, glitches occur at runtime that I can't explain. Here is an example:
These glitches do not occur consistently but appear in almost all ...
1
vote
1
answer
190
views
How to properly set up an AR/XR Unity project for Meta Quest 3 to get past the 3 dots loading screen?
I am developing a Meta Quest 3 (v74 for my OS with SDKs version being the lates the time of writing - v72) application in Unity 6 41f1 (and 29f1), where I currently struggle to get the application ...
0
votes
0
answers
85
views
Unwanted ability to re-buy non-consumable in-app purchase in Unity
I'm encountering an issue with in-app purchases (IAP) in Unity, in the iOS sandbox environment. It seems to be allowing a player to re-purchase a non-consumable item they already bought. Below are the ...
1
vote
0
answers
53
views
Game Manager Persisting? [closed]
In the video you''ll see I change the Time Countdown to 500, but when the game is running the value is 15. I've had this issue before, and re-created the script / prefab from scratch. Can someone help ...
1
vote
0
answers
58
views
Hooking Unity script loading?
I'm jumping in a huge Unity project and looking for ways to develop an initial understanding of the code base.
I'm wondering if it's possible to have the name of the scripts that are being loaded at ...
1
vote
0
answers
66
views
How to hide a Sprite unless it is illuminated by a Light 2D?
I want to have a sprite that is invisible when outside of light, and visible when inside of light.
I created a new Custom Lit Shader Graph in Unity 6 with the following setup:
I then created a player ...
1
vote
3
answers
257
views
How to manage multiple game states without creating unmaintainable code?
I'm developing a game in Unity, and I've reached a point where I need to handle multiple states, such as main menu, gameplay, pause, score screen, etc.
At first, I tried managing this with a switch ...
0
votes
2
answers
203
views
Color local shader graph UVs for texture atlas
I'm going to use a texture atlas for my upcoming project, and am trying to find a way to create a color overlay for only a specific section of my texture.
Below what I'm trying to accomplish, only for ...
0
votes
1
answer
106
views
How can I get Unity multiplayer hosting as affordable as possible?
What are my options with Unity to host a multiplayer server as cheap as possible? Preferable if it's also avaliable in Russia.
1
vote
0
answers
74
views
How do I light textures to get a smooth object?
I've been working on learning how to create painted textures. I was able to create a castle model and hand panted the texture on to it. The castle looks great, but only when it is specifically set to &...
1
vote
0
answers
94
views
A simple, private and secure way to send myself telemetry data during beta testing
I'm creating a game in C# with Unity. I want to know how I can send myself telemetry data (e.g. how long it took the player to complete the level) in the code in a way which is easy to set up and ...
0
votes
1
answer
226
views
IBeginDragHandler.OnBeginDrag / IEndDragHandler.OnEndDrag not getting called
Is there something special I need to do to get the drag handlers to work on my UI?
I have an EventHandler, a Canvas with a GraphicsRaycaster, and the Canvas has 2 children, both TextMeshPro buttons. ...
0
votes
0
answers
38
views
Why cinemachine FOV changes in code, but not changes in playmode?
if (Input.GetMouseButtonDown(1))
{
animator.SetBool("Aiming", true);
vC.m_Lens.FieldOfView = 73f;
Debug.Log(vC.m_Lens.FieldOfView);
};
When I ...
1
vote
0
answers
69
views
Can I apply a single material over every submesh?
I have a shader for outlining an object, how do I apply the material with this shader to all submeshes, not just the last one?
0
votes
1
answer
66
views
How to build a Unity WebXR scene that uses raycasters?
I am fairly new to Unity. I want to create a VR project that I build to WebXR and publish to the web. I am using the sample scene from this project and it helps me get up and running. I am able to ...
0
votes
0
answers
61
views
Controlling Rendering Order of Multiple Canvases in Additive Scenes with Screen Space - Overlay in Unity
Question:
In Unity, I have multiple additive scenes, each with its own camera and Canvas. The Canvases are set to Screen Space - Overlay and use their respective scene cameras. All Canvases are on the ...
1
vote
1
answer
104
views
Changing post processing with code in unity doesn't fully work
I want to change all properties of the lens distortion in my post process profile but can't. I can change the intensity and scale but not the center and multiplier values. This is my code:
...
1
vote
1
answer
214
views
Translating Meta's .haptics file frequency and amplitude to Unity's left and right motor strength
Meta has an application called Meta Haptics Studio that allows you to create detailed haptic timeseries data. It outputs this data in the following format as amplitude and frequency information:
...
1
vote
1
answer
187
views
Random Unity Crash (0xc0000005)
For a few weeks now we experienced random crashes of our Unity game.
At first we thought it was part of our more or less complex Gameplay and Multiplayer implementation but today it happened in our ...
0
votes
1
answer
92
views
Have enemy move toward player when spawned
Have an basic enemy prefab that when spawned, I would like it to lock to player and move toward them, with smooth rotation. However, as you can see in this video, the enemy initially moves away from ...
1
vote
1
answer
171
views
Material with Shader Graph does not fit sprite shape
I am having an issue with shader graphs. I have made a shader to put textures on white sprites. The texture itself shows properly and I can tweak the size without any problems. The issue is that it ...
0
votes
0
answers
29
views
import with superTiled2Unity is offset
I am working with isometric tiles the first time and have some trouble importing them from tiled.
I want them to be imported so that the upper part of the "cube" matches the tile so that i ...
0
votes
0
answers
58
views
Blurry Board Game Node Images in Unity (UI & Sprite Issue)
I'm developing a board game in Unity and facing an issue with image clarity. The board consists of multiple nodes, each displaying a 480x600 px image. However, these images appear blurry and ...
1
vote
1
answer
157
views
Simple Party/Player Movement for Top-Down RPG
So, to keep it short, I am developing a simple top-down RPG. The player (and party) can only move in 4 directions. Seems really simple, but I have not been able to find a good answer on how to ...
0
votes
1
answer
82
views
Cannot find a persistent ID between editor sessions for an object
I'm trying to access the GUID of an object and use these GUID to search for the object, whether it is in a scene or in the ...
0
votes
0
answers
49
views
Adding force to child, so that it affects the parent at the contact point
I'm a novice to game development and experimenting with trying to create an RCS thruster (child game object) on a capsule (parent game object).
What I am desiring to do is to apply a force on the ...
1
vote
1
answer
146
views
ScriptableSingleton doesn't load saved data
I am trying to create a ScriptableSingleton to save certain values for a tool window I developed. The data is saved and loaded as long as Unity is running, but ...
0
votes
1
answer
165
views
Resizing a Sprite in 3D space to match its native pixel size at a target screen resolution?
I am placing a 3D game object with a SpriteRenderer + Billboard attached to it in my scene.
However, since it's a distance away from a perspective camera, the sprite gets scaled, losing a lot of the ...
0
votes
3
answers
603
views
How to use a Shader Graph to layer a texture over a sprite without being affected by the sprite's alpha?
I have a hexagon sprite MainTex over which I want to render an outline texture SecondaryTex independent of the alpha value of the MainTex. Since I have a fairly large grid with many hexagons, two ...
0
votes
0
answers
37
views
Unity Lighting Window API
I am trying to develop a tool for baking light in Unity but with some modifications and additions.
Currently, what I want to achieve is for the commands ...
1
vote
0
answers
61
views
How to get UI Panel color to match GUI Window
Attempting to get a UI Panel to match the color and background of a GUI Window. Currently, using the default style for a GUI Window. Attached is a screenshot of the GUI Window. I've tried access the ...
0
votes
1
answer
164
views
Shrink a Circle's Radius Without Deformation Until It's a Solid Spot
I need to shrink the radius of a ring without deforming it by shrinking it's outline(the way scaling it would).
I need to do this until the hollow fill is gone and its a solid spot.
Here's an example:
...
0
votes
0
answers
59
views
Are segmented characters viable? Are there any future complications I watch out for?
For context, I'm almost a total beginner when it comes to the Unity Engine and game dev with some programming knowledge. As I have already tried to develop games many times in the past, but I lacked ...
0
votes
1
answer
68
views
Difference between BakeAsync and BakeMultipleScenes
I am trying to develop a tool for light baking with certain modifications, but I do not understand the difference between the two functions BakeAsync and ...
0
votes
0
answers
99
views
How to Have Tiles of Different Materials on Single Tilemap
I'm developing a tile-based game where some of the tiles have unique materials (generally to avoid repetitive patterns by sampling a large or procedural texture using world space coordinates). However,...
0
votes
1
answer
136
views
How to calculate the border hexagons in a grid with blocking elements?
I have a hexagon grid with cubic coordinates. I want to calculate clockwise all border hexagons for a given movement range. At the moment, I am iterating every neighbor that is not in the range and is ...
0
votes
0
answers
47
views
Unity 2022.3.45f1 no sound with external DAC
I use a Fiio K11 DAC to improve sound quality and quickly switch between headphones and speakers. Unfortunately Unity doesn't seem to be able to communicate with the device. From my understanding ...