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
0answers
16 views

How long it's taking to fade in/out in this script?

...
1
vote
0answers
20 views

Unity 2D Game: does transparency count as overdraw?

I'm working on a 16:9, 1920x1080, 2.5D point-and-click adventure game and I just today learned the word overdraw. I have a few questions, but first some details about the game: Backgrounds Backgrounds ...
0
votes
0answers
15 views

`System.Xml.XmlDocument.Load(Path)` doesn't work on Android

I'm making a little game on Android with Unity. And I use XML file to store different languages using System.Xml. The language selection is done when I first start ...
0
votes
0answers
11 views

Unity - Clamping UV position using vertices

I'm creating a mesh in runtime (the green block in pics), and want to set the UVs correctly. I'm trying to get the material to fit exactly to each face, but having issues. What I want is this: What I'...
0
votes
0answers
6 views

Eventsystem not detecting button pressed when accessed in certain methods and detecting it in others

The code below does not detect what button is being pressed and outputs the no object instanced error. The code is meant to take the name of the button and then output a string depending on the button ...
0
votes
1answer
22 views

Why does `gameObject.SetActive()` take so long for a hierarchy?

Why does calling gameObject.SetActive()(in the Editor) take quite noticeable time (in my case about 8 secs) if a game object has some significant number of children,...
0
votes
0answers
11 views

Trigger Button with specific key only

I am having trouble understanding how to trigger a UI button with a specific joystick key only. Currently i have a pause menu in which i have several buttons. By pressing start i set the game time ...
1
vote
0answers
12 views

Unity is giving error in importing any of .mpg video file

I know you feel this question like it Unity Error importing any video clip and yeah it's kinda same as that but cause there isn't any working answer there, I am asking it again. In my unity 2019.4....
1
vote
0answers
17 views

Unity 3D - Grappling Gun not making Player lift off the ground at all?

I have the following code (based on https://www.youtube.com/watch?v=Xgh4v1w5DxU but tried to convert to work with world space points for Third Person Character usage): ...
0
votes
0answers
7 views

The fov changes back to normal a fraction of a second after using scope

I'm following this video: How to make a Sniper Scope Effect - Unity FPS Tutorial Everything in this script works, however when I right-click (to scope in) the fov seems to change for a fraction of a ...
0
votes
0answers
22 views

Strange animation behavior for my 3D model

On my Unity project I have a strange behavior for my 3D model which I bought on the Unity asset store. If I move the player, there appears a wired shine / glow… seems that the character does not move ...
0
votes
0answers
14 views

How to implement complex serializable property with internal GameObject field

I'm trying to create a complex serialized object with property drawer with assignable GameObject field. I want to make something like Binding. So that you could declare a field in an X Monobehaviour ...
0
votes
1answer
7 views

After setting a field using the editor API, the field gets cleared on Play in Unity. How to fix it?

After setting a field using the editor API, the field gets cleared on Play in Unity. How to fix it? I have a menu item. That menu item sets a field on one of my game objects in scene. After the field ...
0
votes
0answers
8 views

How to assign multiple functions to one keyboard shortcut in Unity Editor?

I bought a MacBook Pro and I come from a Windows environment. On Windows to rename a file in the assets view or to rename an object on the scene you press F2. Same ...
1
vote
0answers
12 views

Particles render differently on transparent and non transparent background when capturing them with screenshoot in Unity(URP)

Hi maybe the title is not really good so I will try to explain it as much as I can. So I want to take a screenshot of some particles over a sprite. For screenshot I use this code: ...
0
votes
0answers
16 views

How can we stream the go pro video to Unity3D?

hi~ I want to render the go pro hero9's video on a texture in Unity3D. However, I can not visit go pro as a webcam according to the device index. Anyone know how to do this? Thanks!
0
votes
1answer
25 views

Should map labels be gameobjects or on a canvas?

I want to label the countries in my game, like in the picture below. Should the country names be normal unity game objects, or should they live as a textmeshpro on a canvas? For what it's worth, I ...
1
vote
0answers
9 views

How to change scrolling speeds in the Unity inspector?

When I'm in the Inspector tab in Unity I cannot realistically use the scroll wheel on my mouse to move up or down in it. Is there a way to change the scroll speed in the Inspector specifically to make ...
0
votes
0answers
11 views

How to correctly remove a folder in Unity using the editor API?

How to correctly remove a folder in Unity using the editor API? Here is a solution which does what I need. The only problem with that solution is that it does not remove the ...
0
votes
0answers
17 views

FMOD can't enable metering

I’m trying to enable metering, but I keep getting this error. Here’s my code. ...
0
votes
1answer
18 views

How could I put a prefab into a field of a game object using editor API in Unity?

How could I put a prefab into a field of a game object using editor API in Unity? I have a game object. It has a GameObject field. I can drag and drop a prefab from ...
0
votes
0answers
19 views

Unity 3D - CSG / Geomodding meshes runtime

Although I'm not very advanced in Unity, I've been looking into CSG/boolean mesh deformation to see what's possible. I want to break a hole in basic wall meshes at the point the player clicks on, ...
1
vote
1answer
23 views

Triggering animation only its position changes?

I am a newbie on coding, wanted to work on a game as practice and started to work on a 2D top view game, and on a barren desert area, I have a Twigball for my player to touch and move it because of ...
0
votes
0answers
13 views

Platformer movement disabled after crouching

So, the problem is the movement to left and right is disabled after crouching and releasing ...
0
votes
0answers
7 views

Unable to capture transparent background with post processing on while taking a screenshoot in Unity URP

I am trying to capture a screenshot of a sprite with transparent background and it works while post processing is of, but when I turn post processing on background is no longer transparent. I am not ...
1
vote
1answer
22 views

Unity Input: Thumbstick works in editor, not in WebGL

I've built a game in Unity 2017.1.1f1 for the web. I have inputs to allow user to play with either the keyboard or a gamepad (in my case, a Gamecube USB). So far as I can tell, all controls work fine ...
2
votes
0answers
29 views

Collapse a 3D model to 2d with Shader?

I'm trying to recreate an effect of 3D sprites similar to Ocotpath Traveler (2d sprite similar to billboards/imposters in 3D space, showing 8 sides of the character based on where they're facing), ...
0
votes
0answers
13 views

Unity - jagged shadows when export as apk?

Alright, I found this question with the same problem but it's out of date Jagged shadows with default settings My problem is a discrepancy between shadow quality settings in editor vs apk built to ...
0
votes
1answer
27 views

If I create a prefab out of an object on scene will my game take more memory in Unity?

If I create a prefab out of an object on scene will my game take more memory in Unity? I have 30 enemies on my scene. I created a prefab for every one of them. I am going to use each of the created ...
0
votes
0answers
10 views

Platforms appear invisible when spawned at a certain distance in a 2D endless runner game in Unity

I am creating a 2D endless runner game, where new platforms get spawned when the player reaches a certain distance to the last platform spawned. The issue that I found was that after the player ...
2
votes
0answers
12 views

How can you play MPEG-2 Transport Stream (.ts) video files in a WebGL Unity build?

I'm trying to play an HLS live-stream within my Unity app. I could write a script for fetching the short .ts video segments and enqueuing them, but I don't know how ...
-2
votes
1answer
27 views

I need a game over (UI image) to appear after timer reaches 0

So here is my timer script that works fine. I need it to activate the game over (UI image) when the timer reaches 0. I tried attaching a game over script to the UI image (GOS script)..... no luck <...
0
votes
1answer
11 views

how do i destroy a DontDestroyOnLoad Gameobject

I have a DontDestroyOnLoad Gameobject and i just can't destroy it I have tried a lot of things. ...
10
votes
2answers
2k views

What is the Library folder and why is it needed?

What and why does the Library folder in Unity projects do and why all recommend adding it to .gitignore when working with VCS (version control system)? Only it can be somehow simpler, and not like in ...
1
vote
0answers
14 views

Unity Input System: How to handle input from specific device types when the binding abstraction fails?

Is there a way for Input System code to determine what kind of device generated an Input Action's current event, so that it can be filtered based on device type? The example I have is an Orbit Camera ...
1
vote
1answer
32 views

How to manage a lot of items on conveyors

I am making some sort of factory game (topdown 2D) where I will have machines outputting items on conveyors. I was wondering what was the best approach to manage the items on the conveyors. There are ...
0
votes
1answer
64 views

Why can't the player walk properly on the moving platform?

I'm making a platformer with Unity. In one of the scenes, I have a moving platform that moves back and forth. The problem is that the player can't walk (or sometimes jump) properly on the platform and ...
0
votes
0answers
13 views

Can't get player to walk to object using NavMeshAgent

How can I get my player to walk to an object using NavMeshAgent? I've tried multiple tutorials and tried things I've come across online, but none of them has solved ...
0
votes
1answer
21 views

How could I intercept a save scene action being run in Unity?

How could I intercept a save scene action being run in Unity? There is some code I would like to run in editor whenever a scene is saved. Is it possible for me to detect somehow when a scene is saved?
0
votes
0answers
17 views

How could I recreate a destoryed object in Unity?

How could I recreate a destoryed object in Unity? I want to implement a system which would respawn my enemies after I kill them. I have different kinds of enemies with different kinds of ...
1
vote
0answers
28 views

What is the new Input System equivalent of Input.GetAxis(“Mouse X”)?

At first, it seems that Mouse.current.delta.x.ReadValue() would be the most equivalent, but they give different outputs. The purpose is porting old Input code to ...
0
votes
0answers
48 views

How to decay sine or cosine wave so it takes one additional period to reach equilibrium

In many shmups, when enemies arrive, they accelerate onto screen, decelerate, and overshoot their static arrival position slightly, before backing up slowly to the position. This can be seen in many ...
1
vote
1answer
15 views

How to change multiple materials attached to one GameObject

I am working on a script that changes the material of a selected object when hovered over. The object(s) in question have multiple materials attached. The problem is that only the first material is ...
0
votes
0answers
58 views

The variable hasn't been assigned(but it has)

I'm trying to make Pause Menu. When I press "P" to pause/resume game it works. But When try to resume game via button it gives this error. ...
3
votes
0answers
14 views

Show meshes in orthographic views in Unity editor

A long time ago I used to map using GtkRadiant and then UDK. Both of these editors had both 2D and 3D viewports at the same time, so you could do your floor plans in 2D and easily do alignment and ...
0
votes
0answers
5 views

Solving the problem of thick colliders at intersections?

While I somehow solved my collider issue in about 99% cases, there are cases where the solution simply doesn't work. This is an intersection and the logic of thick colliders simply don't work here: ...
-1
votes
1answer
38 views

Several questions about Unity license and revenue from games

So, what I know is if I'm using Unity Personal Edition and start earning more than $100,000 I need to upgrade to Plus or Pro, but I have some questions: If revenue from the game reached more than $...
2
votes
0answers
37 views

How can we use an iPhone camera as a webcam on Windows?

I am developing a game on Windows and I want to use my iPhone 11p as a webcam (for video streaming). I saw some tutorial videos on YouTube, yet they only work for development on iOS platform in Unity. ...
1
vote
1answer
33 views

How do I create a perfectly set up FBX file by script?

I have a huge FBX file which contains make animations. I want to split these into different takes by using a C# script file. It worked, but it happened often that I messed up the FBX file because my ...
-1
votes
0answers
30 views

1
2 3 4 5
283