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,736 questions
12
votes
1
answer
1k
views
Destroying the parent when all children are destroyed
I have a spell system where a the spell is a self-contained game object handling all the logic. When done, it destroys itself. This works great
Then I added a second game object handling animation, ...
3
votes
1
answer
122
views
What’s the correct / idiomatic way to pause a game in Unity?
I'm trying to implement a robust pause system in Unity and I'm confused about the correct approach. My first (very simple) implementation in my previous project used a ...
0
votes
3
answers
134
views
How do big open worlds handle Object Pooling?
Object pools are great. They are fun to make, save you a lot of memory and fps.
But as my projects grow in size and complexity it gets harder and harder to work with them. If you only have a couple of ...
1
vote
0
answers
21
views
Halftoning Multipass HDRP Unity
I am pretty new to rendering, and I wanted to add a black and white halftone effect. I wrote the two shaders and created the materials (pass 0 to create mask and pass 1 to mix it with the scene). They ...
0
votes
2
answers
105
views
When should an object with a collider have a rigidbody?
I had some questions about Physics / Rigidbody in Unity.
I have a 2D sprite with a collider. The 2D sprite is simply a card that I place on a table with the mouse. I use the collider for raycasting (...
0
votes
2
answers
119
views
Why is my rigidbody not moving when I press the buttons? I can't see any reason it shouldn't
The "Car" in question is a plane. The question is pretty self explanatory.
Here's the Car in the Hierarchy:
Here's the car in the inspector:
And here's the PlayerMovement script:
...
0
votes
2
answers
80
views
How would I make a "slideshow" cutscene?
I'm making a 2D game using Unity and I want to implement cutscenes that change over at certain lines.
...
0
votes
0
answers
86
views
FPS improves when parents of skinned AI are disabled before play, but not when disabling them during play
I am playing a scene in Unity editor. If I play the whole scene, the FPS is 125.
Next, there are 2 test cases.
Case 1: If I disable some big game objects first, and then play the scene, the FPS is ...
0
votes
1
answer
48
views
How to Render Moon Phases from a Texture2D in Unity Using a Script?
I have a Texture2D of the Moon, and I want to render different moon phases so that it visually matches the examples shown here Celestial Programming : Moon Phase Image Rendering, I've tried several ...
2
votes
1
answer
96
views
Can't Get Unity New Input System To Work
For context I am very much a beginner.
I have been trying to get the player to move using Unity's new Input System following this tutorial. It's only a year old and others in the comments seemed to ...
2
votes
0
answers
62
views
How can I disable the built-in gyro control in Cardboard VR?
When I create a project in Unity, enable Google Cardboard VR support, and build a project on Android, the camera is controlled by a gyroscope, although I did not write any controllers.
Even if I ...
0
votes
1
answer
72
views
Where is UnityFramework.framework located in unity xcode exported Project
I want to use Unity as a library for iOS platform. I exported the build from Unity for iOS. But I am unable to locate UnityFrmework.Framework. Is there any step i am missing?
Unity Docs states that: ...
0
votes
1
answer
36
views
Transform is not available in SystemBase Script (Unity Entities)
My player is baked entity in subscene while main camera is outside on scene. For some reason system cannot find transform of camera, GameObject was found though.
<...
0
votes
1
answer
58
views
Does SceneManager.LoadAsync(name) load the whole asset or only the prefab?
I have an asset called "Ocean" that contains 100 fish, and one of the prefabs for these fish is called "Dolphin".
My game has 100 scenes, and each scene contains 1 different fish ...
-1
votes
1
answer
125
views
How can I implement a fish character with a “chargeable tail” mechanic
I’m trying to replicate the fish physics from Fish Volleyball.
If you want you can try demo of the game or watch video preview
The unique part is that the fish doesn’t jump normally — instead, when it ...
0
votes
1
answer
108
views
URP Maximum Sample Index (16) with Light Cookie Input
I just recently imported a new asset package, all of the materials use the URP lit shader, no custom shaders. However, now I can't build the game because I keep getting the same errors:
...
0
votes
1
answer
127
views
Mipmaps and LOD Behavior in Skybox Shaders
Is it beneficial to use Generate Mipmaps for a texture used in a skybox shader?
I need to use tex2Dlod to fix the edge seams ...
1
vote
0
answers
81
views
using Unity URP/lit shader with skinning and DOTS
I'm using:
Unity: 6000.0.51f1
Entities: 1.3.14
Entities Graphics: 1.3.2
URP: 17.0.4
Shader Graph: 17.0.4
I'm fairly new to both DOTS and Shaders, but when trying to use DOTS with URP combined with ...
1
vote
0
answers
62
views
How can I dynamically make a distance field shape of the lit part of the moon to use it as a halo in a custom skybox shader?
I created a custom skybox shader featuring a black sky with only the moon and its halo. The moon responds realistically to the scene’s directional light (sunlight), which creates a convincing effect. ...
0
votes
0
answers
50
views
Is a shader easier or scripting easier in terms of creating a panel behind objects
My unity project is 2D universal.
My goal here is to create a comic-like panel with outlines behind objects that have certain tags. This panel should follow the rotation and size change of said ...
0
votes
1
answer
111
views
How to reduce the size of my terrain?
I made a WebGL game at https://jugglecats.itch.io/startastic (password is "password"), but the game was far too large, making it take a too long to load. Upon inspecting the build report (...
0
votes
2
answers
86
views
UI tween animation completely different on Phone and in Unity Editor
I have this function that spawns an Icon from a world position and animates it to correct UI position. In editor it works fine but in apk on phone it has a wrong starting position. Now as I understand ...
-1
votes
1
answer
68
views
How to match UI text size and position between editor and build?
In the editor, it does not matter if I set the resolution in the game view to my pc resolution (1920x1080) or to "Free Aspect".
The only thing that changes is that in "Free Aspect",...
1
vote
1
answer
108
views
Adjusting movement vector for converting to input vector in an isometric game
I am currently modding in keyboard and mouse support for a Unity game that only supports controllers. The game is in an isometric style, and as such, the game camera is slightly tilted. The original ...
0
votes
2
answers
121
views
Camera Snapping instead of panning
I am trying to make a camera system for a 2D platformer, with three camera modes to begin with:
Follow, normally following the player
Horizontal: Y is set, X follows player
Static: Locked to a certain ...