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
1
vote
0answers
6 views

How to stop my particle systems from being frustum culled

Please could somebody advise on whether it is possible to control the culling of particle systems in Unity? I am referring to the entire system, not individual particles. In my use-case, I am ...
0
votes
1answer
6 views

How to mitigate when applying horizontal force to a rigidbody seems to overpower gravity?

I've started testing movement using the example code in this answer of making a body accelerate to a target velocity ...
0
votes
0answers
9 views

How to hide a sprite on trigger when the player enters the trigger zone?

I am making a roof for my 2d top down survival game and I want to make it so when the player enters the building the roof disappears and when they exit it reappears. Thanks for the help. By the way i'...
0
votes
0answers
7 views

Unity3d Rigidbody movement along slope slowdown

I have a Rigidbody character controller (Unity, C#) which I'm trying to make work seamlessly when walking on sloped ground. I've got it working fine walking up and down a slope by changing the forward ...
1
vote
0answers
14 views

Unity ads - not showing on phone

I'm trying to implement unity rewarded ads. They work fine in the editor. However when I run it on my phone, the ads don't show up. Nothing happens when I click on the show ads button. I have a very ...
0
votes
0answers
10 views

Programmatically extract textures from an arbitrary material

How do you programmatically extract the textures and other properties of an arbitrary Unity material? Ideally runtime - I'm trying to upload the data to the server for remote access.
0
votes
1answer
16 views

How do I keep vertex position when changing material?

I've created 2 shaders using shader graph which I'm applying to a sphere to simulate a ball of water/ice. The water shader distorts the shape of the sphere over time to look like it's flowing a bit. ...
0
votes
1answer
12 views

Divide two quaternions evenly by a scalar to get a smooth rotation in-between

How do you divide two quaternions - say A and B - evenly by a scalar, to calculate the rotations between them to render a ...
0
votes
0answers
14 views

Mesh filter component is removed from prefab [Unity]

I am trying to procedurally generate a city with cubes. I generate the cubes' location, size and textures randomly with an external program and I save to a txt. I created a script in C# that loads ...
0
votes
1answer
31 views

What are the dangers of setting rigidbody velocity directly for movement and what are the alternatives

I'm playing around with Unity, trying to make a neat 3rd person platformer movement system using rigidbodies so that I may in the future implement things like pushing boxes/physics objects, grappling ...
0
votes
0answers
14 views

Shader map in unity

I'd created a shader graph in shader editor of unity. And I applied it to new material also. When I imported a .fbx object(box-like object and vertical slab like object) and applied that material in ...
0
votes
1answer
27 views

Unity, interior poly always missing in clothing

I've modeled interior polygons but for some reason they do not show up in Unity. I've tried changing import settings for normals to both calculate and import... How do you have a tshirt's interior ...
0
votes
2answers
37 views

Is using events a good way to have the option to return out of a method or alter its normal execution?

Let's say I have a script that calls a method frequently, and when doing so wants to allow other objects to know about it and potentially alter what happens in that method. This is fairly simple to do ...
-1
votes
1answer
33 views

Why is my object not destroyed when the HP is reduced?

I tried to write a script that declares an object to have hp 90 initially and every time you click on the object, it turns red and will reduce the hp by 10. When the hp is lower than 10, it should ...
0
votes
0answers
12 views

unity spriterenderer scale to fit screen portion

let me explain what i have. a camera that render only a sprite ( sprite renderer) and what i'm looking for is to scale that sprite renderer to fit a screen portion (not the entire screen) for example ...
0
votes
1answer
41 views

Camera animation stutters on first launch

The camera stutter for a fraction of a second when animating a camera from one position to another position. This issue only happens when the game is launched for the first time after installation. ...
0
votes
0answers
7 views

Material is missing after build with Unity Cloud

when I tried to build with unity cloud, materials aren't in the build. there is no specific shader I just used the default URP material. after a while, I found the problem. when I import new models I ...
0
votes
0answers
8 views

How to change frames for the same object

Lets say I have four frames A,B,C and D. In idle condition, I want the game object to repeatedly running on frame A and B . When using the method OnMouseDown, the same object change to frame C and D ...
0
votes
0answers
21 views

How do I fix missing anti-aliasing in the Unity scene view and game?

Both the editor and the game seem to lack anti-aliasing even though quality is set to Ultra. I chose the "3D" project template when I created the project, so I am using the build-in render ...
0
votes
0answers
23 views

How to make player walk through layers of 2d fog smoothly?

I'm trying to recreate the fog effect that Graveyard Keeper has, with several layers, so taller objects will get less fog. I'm using the approach described here: the devs post on Gamasutra The problem ...
0
votes
0answers
15 views

How to trigger onclick for Unity Selectable by script?

As title, I know Button can be triggered onclick by button.onClick.Invoke(); But how to simulate onclick event of Selectable? Thanks for the help.
0
votes
0answers
8 views

Unity Addressables - do all editor instances need a local copy?

I'm able to get Unity addressables to load in editor 1 ("project 1"), where it is both generating the .json/hash/bin and loading the prefab asset into scene. This is then placed on AWS (and ...
-1
votes
0answers
25 views

How do I make a heat bar slowly go down? [closed]

I am making a winter survival game with a heat bar. The bar needs to slowly go down when the player is out in the cold. How can I do that in Unity?
0
votes
0answers
9 views

Unity prevent force apply on re-enable Physics2D.IgnoreCollision

I'm making 2d platformer game. My player and enemies are rb with body type Dynamic. I choose dynamic for enemies because enemy need physics ( jumping, colliding ...
0
votes
1answer
25 views

Scene reset function not working

I am entirely new to programming. Recently just watched this YouTube tutorial and follow the way the author wrote the code until (1:22:24). I'm not sure why the scene reset function for trasnform....
0
votes
0answers
29 views

Why are .anims so big?

I am in the process of recording dialogue via FaceCapX and an animation recorder script that checks for changes between frames and if there is one it saves the value of 52 blend shapes, as well as ...
0
votes
0answers
15 views

Unity: Texture glitches on Build

I'm getting the most horrible glitches on multiple materials and objects. In the Unity Editor everything is fine. When building individual scenes alone it is fine. But when I build all the scenes ...
0
votes
0answers
12 views

Issues with spine animation alpha in iOS

We are seeing a ton of artifacts and strangeness with alpha on iOS for our spine animation assets. You can see an example of one of these grid-like artifacts here, but we're also seeing pixelation etc....
0
votes
0answers
12 views

How do I fix “Debugger operation failed” in Unity?

I'm having an issue with the Unity debugger: it keeps saying Operation failed due to the state of the object. Here is a screenshot of what I have: How can I fix this? System: Mac.OS Carolina 10.15.7 ...
0
votes
0answers
20 views

Physics2D.IgnoreCollision not work when rb not moving

I want to use Physics2D.IgnoreCollision for ignoring collision between enemy and player, when player have shield. But I have enemy who some time is static and some time jump only on y axis. When enemy ...
0
votes
1answer
21 views

Unity build issue - GooglePlayGamesManifest and GameServicesManifest

I have added leaderboard to my unity game for which I have used the google play services plugin. But when I try to build, this is the error I get: ...
0
votes
1answer
43 views

Unity ads issue - null reference error

I'm trying to add unity ads to my game. In my game there are three panels - startgame, ingame and gameover. Once the game starts, only the startgame panel is active and once you tap on the screen, the ...
0
votes
0answers
20 views

Editor data is not there in unity

I relaunched my prev unity project and the editor is not behaving as intented... All the data that was manually set in the scripts in inspector in not there... All the public variables and references ...
0
votes
1answer
32 views

How can I access a variable on a script in another scene that I made it dontdestroyonload?

I need to get access to the variable flag loading from some script in another scene. The variable loading in my main menu scene and I need to access it in scripts in my game scene. I'm not sure if ...
0
votes
0answers
25 views

Exclude removed objects from list counting?

I want to count the number of objects on my list. But because I remove and add, my script keep count those empty elements. update: This happen when I destroy the object when it inside the collider. ...
0
votes
0answers
22 views

Character sinks into ground when switching animations

I originally posted this question on the unity forums, but no one answered my question. Here it is: Hello, I have been game developing since May and today I finally figured out how animations work in ...
0
votes
1answer
14 views

Unity Unable to blend 2D Light renderers

I've followed the documentation on Unity regarding 2D lighting. It said to turn on Alpha blending in the options. But this is how it turns out: If Alpha blending is off: If Alpha blending is on: I'm ...
0
votes
1answer
26 views

Unwanted jump when landing

I managed to make my 3D player character jump (hurrah!) but I get an unwanted jump upon landing. It's not a mid-air double-jump. If I press space mid air, then after it get backs to ground it ...
0
votes
0answers
22 views

C# or Javascript for Unity 3D? [closed]

I am thinking of creating games using Unity 3D and I know that it supports C# and JavaScript. I want to code in JavaScript but I don't know if it's a good language for that because I found many videos ...
0
votes
1answer
21 views

Clones size is bigger than the original?

I'm trying to clone items inside array. But the clones i'm getting is bigger than the original one!! Also, after couple of second the script is missing/removing some clones !! Update 1: I'm working on ...
0
votes
0answers
6 views

Limits of FixedJoint in Unity

I've built towers of cubes where each cube is connected to the one before with a FixedJoint. At 30 high they flop about as expected, but at a certain point (...
0
votes
0answers
29 views

How can I make a health bar — a UI element — part of a character prefab?

Description I want my character prefabs to come with their own health bar, but I can't simply add one as part of the prefab, because it's a UI element and therefore goes into a Canvas. Potential ...
0
votes
0answers
21 views
0
votes
1answer
26 views

How would I go about adding a tooltip to a Unity UI Image?

I'm going to try out the community here once more, I haven't had very good look in the past with getting help. I'm iterating through a series of List() and I'm creating a bar graph and a line graph ...
0
votes
0answers
14 views

Unity 2D Player Shoots at my joystick position

Hi I am new to unity and have only a little coding knowledge. Right now I have made my character shoot at my touch position on mobile but when ever I touch the joystick, whick I use to move my ...
0
votes
1answer
8 views

How to get neigbor pixel coordinates in Unity HLSL shader

I am writing Mandelbrot set shader for Unity. I wrote an Image Effect shader and it works. Unfortunately, each point "shimmers" on translate scale. This is because, for each shader call I ...
0
votes
0answers
11 views

unity graphics initialization

Pretty short question, when I load unity, I get this error: Is this fixable with driver downloads, or do I need a new PC?* *if so, how do I find out my computer's default built-in graphics driver?
1
vote
0answers
17 views

player softbody

I need some help with a softbody mechanic on a player in unity and I don't know how to approach it yet. I want to try rigidbody collision on individual sections of the mesh, or mess with the cloth ...
0
votes
0answers
31 views

Trying to creating roads from a 2D texture into a 3D map using RoadArchitect

I need help with a complex task I'm trying to creating roads using RoadArchitect: https://github.com/FritzsHero/RoadArchitect/tree/RewrittenAPI I'm trying to detect all roads from a texture. I have ...
0
votes
0answers
12 views

How do I find more details about a Vuforia error when going into play mode?

I want to make an AR app in Unity using Vuforia Engine. But when I try to enter play mode nothing appeared. Here's the error alert: Since this error does not give me any clue about what went wrong, I'...

1
2 3 4 5
261