Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
15 views

How to customize sliders in Unity3D

I would like to customize a slider in Unity3D but don't know how to accomplish this. I want to change the border (i.e. the thickness and color) of the slider. How do I change the corners? Also I ...
-1
votes
0answers
41 views

Using a Singleton for an EditorWindow

I am trying to create my custom EditorWindow in Unity, using a Singleton structure for logic between Editor scripts What is the proper way of creating Singleton in EditorWindow structure? Maybe ...
0
votes
0answers
19 views

Unity Erase Image from mouse pointer

I want to erase the image for mouse pointer in unity. My pointer should be as a eraser. What is I do create the eraser? My sprite is always change because it provide from the server. Please help me.
0
votes
0answers
25 views

Need Root Motion For Gravity, But It Affects Rotation?

I have a little animated character in my game with multiple animations. In order to have gravity affect him, I turned on "Apply Root Motion" in his animator. Now one of his animations won't rotate ...
0
votes
2answers
38 views

FoV value scaling

I'm creating an FPS project in Unity 2018. My reference FoV is 90. Let's say I'd like to create an sniper rifle which let player change FoV to 60 when he's aiming with optics. But what should be the ...
5
votes
1answer
260 views

How to Implement a Very Simple Game State Manager in Unity?

I’ve tried a bunch of different implementations, and trawled everything online I could get my hands on. Everything has downsides, nothing plays nicely with how Unity wants you to work. Let’s keep it ...
0
votes
0answers
22 views

Unity Blender Android Parallax App

so my question is: from a 3D object made in a blender, let's say a tunnel that i would like to loop or stop it. i would like to get a parallax effect from it. when the gyroscope of the end of this ...
1
vote
1answer
26 views

Tell Unity to use a certain LayerMask to raise or not OnDrop (for a class that implements IDropHandler)

I am trying to make a draggable GameObject that can be dropped within a container but when i'm releasing the mouse button even though the mouse is over the container (and the dragged object too) ...
2
votes
1answer
60 views

Unity - X axis back to front

I'm using Unity 2018 and its really confusing me. I generate a plane mesh in code and when it comes to positioning (transform.position.x) it on the X axis I can't understand why moving it further to ...
3
votes
1answer
82 views

Wraparound world with wraparound horizontally physics implementation in Unity

What is the best way to implement a wraparound world with wraparound horizontally physics in Unity? That means that if I have an object and move it so that a part of it sticks off to right (so that ...
0
votes
1answer
20 views

Partial object culling without alpha + transparency?

I am trying to partially cull an object which has subsurface scattering. It's simple to do it with an alpha channel, however, using an alpha channel with transparency will disable subsurface ...
1
vote
1answer
43 views

Accelerometer input for flying game

I'm trying to create an infinite flying game where the gameobject (a plane) keeps moving forward and at a particular height throughout the game. I want to be able to roll and pitch the plane but not ...
0
votes
1answer
41 views

How to transfer an object from one state / form to another

I want to do a similar cooking meal like in the game "Overcooked". Where do you cook a variety of dishes. I can not grasp the idea of ​​how it is implemented or where to start. You take an object (...
2
votes
1answer
70 views

How to detect when the mouse is over a particular enemy collider, without falsely selecting bullet colliders?

I have an enemy shooting around. My game mechanic involves hovering over the enemy with the mouse to drain its health. While the enemy is moving, you need to follow it with your mouse. If you don't ...
0
votes
1answer
63 views

Prevent Unity from crashing your computer?

Recently, I made a very dumb mistake that caused Unity to crash my computer. I could move the mouse sometimes, but everything else became completely unresponsive, leading to me having to shut off my ...
0
votes
0answers
19 views

Augmented reality outdoor tracking using ArCore and GPS

I have a unity android augmented reality application using googles arcore SDK. In the unity application i have a swarm of drones that fly arround the scene. As well as this, i have a 3d model of the ...
0
votes
0answers
34 views

How to zoom image on Unity UI to particular point where mouse cursor is located?

I have some RectTransform on Unity UI. I have already implemented some Zoom functionality but now I need it to zoom to the area where the mouse cursor is located. Currently, it zooms to the anchor ...
1
vote
1answer
49 views

Affecting all instances of a GameObject at once

I want all instances of a prefab to change their velocity when one of them is clicked, and I think having each object constantly check a variable with a coroutine might not be the best solution. How ...
0
votes
1answer
48 views

Does transparency work with SSS in Unity's HDRP Lit shader?

I am using Unity's HDRP Lit shader in Shader Graph (all are version 4.8.0-preview) on Unity 2018.3.0b12. I am trying to use both transparency and subsurface scattering on the material. However, it ...
1
vote
1answer
82 views

GPU (render time) increase if screen size increase

i create a simple 2d scene in unity 2017.3.1f1 I changed the size (height and width) in the Game View and proflie to see how it affects the rendering.. (below photo) I saw that the rendering time ...
0
votes
1answer
17 views

Unity: How do I get the coordinates of the vertices of a blender mesh?

I have gameobjects in my scene called icospheres that I have made in Blender, and I am trying to get the coordinates of their vertices. Below is an image of my scene; each triangle is a separate ...
1
vote
0answers
25 views

Export Blender materials to Unity3D

I have a low poly model that I made in Blender 2.8. Because it's low poly, it only has a material that's a mix between a diffuse and a glossy shader - it has no textures. The only thing I want to do ...
0
votes
1answer
36 views

How would I prevent parts of my player model from displaying on the camera?

The "legs" of my playermodel are shown when looking down. I'm using the Unity First Person Controller template. Character when in Scene view: Character when looking down in Play mode:
0
votes
0answers
17 views

Unity MatchMaker not finding rooms on different computer

I followed tutorial about Multiplayer FPS by Unity. When I used MatchMaker on the same computer the game was able to find the Room. But when I used MatchMaking from a different computer it didn't work....
0
votes
1answer
75 views

low FPS when battery is low ( unity android )

i make a simple 2d scene in unity 2017.3.1f1 (only 5 sprite renderer). I realized that when my Android device's battery is under 20 %, the frame rate will be 60 to 30. I did all the optimizations I ...
1
vote
1answer
53 views

Does Unity3D custom shader use its default GPU or CPU skinning automatically?

I'm writing my own shader in mobile, but was wondering if it uses default GPU or CPU skinning feature in Unity3D? I'd like to use GPU skinning and already enabled GPU skinning. Is there any way to ...
0
votes
0answers
27 views

Wind Trees from Book of the Dead in a Separate Unity Project

I want to make wind work on a project separate from Book of the Dead demo. I've been able to import the tree assets, plus the WindControl script and two helpers ...
0
votes
1answer
49 views

How to delete Unity Hybrid ECS Entities?

I'm trying to get into Unity's Hybrid ECS feature. Creating and Manipulating Entities has worked fine so far for me, but somehow I can't find a viable option to delete Entities which works 100% of the ...
1
vote
0answers
51 views

Draw a perfect circle in UI

This is the problem I have. I have created a shader that draws circle. But depending on the distance from the camera thickness changes. Is it possible to keep thickness constant?
0
votes
1answer
51 views

Unity Checkpoint System that remembers NPC interactions + Environment changes?

I have already implemented a checkpoint system that respawns the player at the last checkpoint they cross through. Now imagine this: NPC A interacts with NPC B NPC B walks over to a nearby car A bird ...
0
votes
1answer
22 views

How to determine what direction an object should orbit around another

I am creating a game in Unity with 2D. When a button is clicked a static object is attaching a hinge joint to a dynamic object, so the dynamic object orbits it. When the dynamic object gets attached, ...
0
votes
0answers
22 views

Optimal way to select a random item from a list based on its chance to appear in Unity [duplicate]

I am creating a random object spawning script in Unity with c#, and am wondering what the ideal way to do this task would be. So I have a list of 31 objects or so, of my special class type. Each one ...
0
votes
1answer
29 views

Help with 3D Double Jumping in Unity

I'm having some trouble with vertical movement. I'm trying to add double-jumping but none of the scenarios online seem to be working, and I can only ever manage to get a single jump. Here's my code: <...
0
votes
1answer
48 views

How do I spawn trees so that they stick out perpendicular to a 3D planet?

I have a 3D tree that I want to clone so that it is perpendicular to a planet gameobject, so it looks upright when spawned. I tried by copying down all desired rotations of the tree and adding them ...
0
votes
2answers
30 views

Trigger an event only if two colliders fully cover each other

Let's say I have two different objects that can go through each other. Both have a circle collider (2d) that has the exact same size and there is a good chance that the two colliders will completely ...
0
votes
0answers
29 views

Can a material be created from a gameobject in Unity?

I am trying to manually create snowflakes in unity, after I created a snowflake in the unity scene, is it possible to create a material out of it?
1
vote
1answer
61 views

How to get crash reports from game Unity3d

I am working on a project and I am in need of to gather CrashReports, email crash log, along with allowing the user to describe how the crash happened. I cannot find anything on how to do this, anyone ...
1
vote
1answer
33 views

Prevent UI Button focus loss when clicking somewhere else

I have a set of UI buttons in a canvas. The user is be able to navigate the buttons through both mouse clicks and arrow key movements. However, clicking anywhere not on the buttons results in focus ...
0
votes
1answer
35 views

Sometimes can't use the rendered mesh as a collider in Unity?

Most of the times I can use the Mesh Filter's mesh as collider in Mesh Collider But sometimes there is just nothing. No ...
1
vote
2answers
54 views

Why when adding audio foot steps to the character using animation events only one foot play the sound?

The animation in the Animator is HumanoidWalk In the inspector of the animation in the Animation tab at the bottom I clicked on the Events clicked to add event names the function as Step and moved the ...
3
votes
0answers
63 views

In unity, making a navmesh for a tiny planet?

I'm trying to build a scene in a small planet, and baking will always give me the result on the half top of the planet. But what I want is to create a navmesh all around the small planet. I am ...
0
votes
2answers
34 views

How to convert RotateAround speed to directional speed in Unity?

I am currently using transform.RotateAround(transform.position, Vector3.forward, degreesPerSecond * Time.deltaTime) to make an object rotate around another ...
0
votes
2answers
65 views

Cannot import an .svg into a Unity project

I cannot import an .svg into a Unity project. When I just move the .svg file into the Unity project Unity does not work with it ...
0
votes
0answers
23 views

Unity: [Command] not invoked by client on server after reconnect

f anyone would know of a cause: I implemented a networked console window that that correctly communicates with the server... the first time it connects. If I close the client, then reconnect again ...
0
votes
1answer
36 views

Move a point to another, along an elipse

according to this picture, I want to move my yellow object, smoothly to the red one. And I want to have an eliptic trajectory in relation to my center point. So for now I'm having this code: ...
0
votes
1answer
16 views

Transfer mouse movements to a GameObject in 3D according to camera position and rotation

I'd like the game object to follow the mouse but I have trouble doing this when the object is in 3D and the camera has been rotated. The only thing that seems to be true (and still it works only when ...
2
votes
1answer
50 views

How to arrange copies in circle that includes the cloned object not at the centre

I am using the editor code below to create copies of a game object in a circle with a given radius from the cloned object. The result is A in the image below, the cloned object at the centre with ...
0
votes
1answer
9 views

IndexOutOfRangeException on array of transform prefabs in Unity

I have a public array of length 9 containing prefabs I'm using as position references for a moving object. The start function finds the transform.position of the appropriate transform in the array and ...
2
votes
1answer
78 views

C# Improve performance when looping and comparing values on Dictionaries?

On my quest to creating 0 garbage when procedurally generating points I've stumbled upon a performance issue when comparing values to another values stored inside Dictionaries. Initially I used ...
-1
votes
1answer
48 views

Rotation Problem in Mario galaxy like controller [duplicate]

i'm doing a Mario galaxy like CCC. And I have a serious rotation problem, may be Gimble lock, or maybe not. So first, I have a parent object ("PLAYER") who can rotate toward a planet: https://youtu....