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,738 questions
0
votes
2
answers
89
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
132
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
126
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
63
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
117
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
135
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
143
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
136
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
187
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
82
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
52
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
64
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
251
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
197
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
98
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
93
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
218
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
62
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
59
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
103
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
212
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
181
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
90
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
162
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
57
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
76
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
140
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
164
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
585
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
162
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
67
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
96
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
131
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
45
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 ...
0
votes
0
answers
48
views
localPosition for UI object gives different results from its values in the script
Here is my script for opening animation. It basically sets the localPosition of an object out of the screen and then brings back in smoothly. The problem is I got ...
0
votes
0
answers
31
views
Unable to join NavMeshSurfaces for different floor areas
In Unity 6, I have a NavMeshSurface attached to a floor with other items as NavMeshObstacles and this seems fine.
The problem is,...
0
votes
0
answers
69
views
Making a slingshot inspired launch mechanism to hit arbitrary point on edge not just fling straight through center of mass
In a 3D world, I have a hockey puck-like body.
I have made a mechanic where I can launch the puck with a slingshot mechanism.
But the point of contact is determined with a raycast and the "sling ...
0
votes
0
answers
123
views
Unable to determine cause of memory leak in Unity when using Addressables. Can anyone give suggestions on what the cause might be?
I'm creating a simple bullet hell game for Android and I ran into an issue when diagnosing my game using the Memory Profiler where memory usage was increasing after each play-through. I had calls to ...
0
votes
1
answer
56
views
Did they change how Player Input SendMessage works when sending messages?
When I first used it I remembered it as always calling the specific method once. So if I created a Jump Action with the key binding of space using SendMessage:
and then created a method for it:
...
0
votes
1
answer
121
views
How to post-process local cameras differently?
In Unity 6, there are multiple options for post processing, but I have been unable after many tutorials and AI advice and the Unity docs, and also installing free packages and removing them and ...