Stack Exchange Network

Stack Exchange network consists of 174 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.

6
votes
1answer
466 views

How can I fix zig-zagging UV mapping artifacts on a generated mesh that tapers?

I am creating a procedural mesh based on a curve and the size of the mesh gets smaller throughout the curve as you see below. And the problem is UV gets zig-zagged as the size changes (it works ...
1
vote
1answer
46 views

Piece of code causes game to freeze, then keep playing after sometime

Games Basic Premise Ball rolls along procedurally generated path. Click to changer directions. Don't fall off. I have a script dedicated to the path. The path is made up of 20 cubes, along the x+ and ...
1
vote
0answers
18 views

Unity Physics Simulation - Limitations / Inaccuracies? Bounciness of a ball (pool/snooker balls etc)

I am playing with Unity physics engine. I have a pool table and a cue ball. Both have Physic Materials. If I start the game, with the ball floating about 1m above the table, it falls and bounces (...
2
votes
3answers
34 views

RTS Unit AI: When to let the unit stop (due to local avoidence)

I am developing an RTS-like game, that have units that move and attack. I implemented path-finding and local-avoidance. One problem is when multiple units being ordered to the exact same position, ...
0
votes
1answer
26 views

Rider Language level keeps resetting

We've started working with Unity 2018.3.0b11 recently, and this means we can now use newer C# features, which is amazing! However, every time I've restarted Rider, it starts complaining about any C# 7....
0
votes
1answer
44 views

How to stop car from slipping backwards on a slope?

I am trying to simulate a car in Unity, the slope of the road is high so the car slips backwards. Is there any physics property which can stop this from happening? Thanks in advance.
0
votes
2answers
31 views

Update dependent values of Serializable C# classes on Inspector

I have some data types' properties that depend on the input given into other attributes, but I haven't found in the Unity's API an elegant way to update them automagically on the Inspector. As an ...
4
votes
1answer
42 views

Locking or overriding game object scale property coordinates in inspector window

I want to know if it is possible to lock or override the X and Y coordinates of the scale property in the inspector window so that changing one coordinate immediately changes the other and scrubbing ...
3
votes
2answers
3k views

Unity - Trying to copy the render texture for the scene rendered by a camera but it is blank?

I'm trying to copy the scene rendered by a particular camera to a render target. I know this should be possible to do without using the camera's target texture as I read through this official Unity ...
0
votes
2answers
67 views

Fire at enemy script doesnt work

I need my enemies to fire at me. I have a script and I think all is correct. I couldnt figure out why it doesnt work? ...
0
votes
2answers
131 views

Time passing display on UI in Unity in C#

How can I display the time and how many days on a UI in Unity. Time would be moving faster like a week in 7 minutes? Should I use Time.deltaTime and how do I excellerate the time it displays?
1
vote
2answers
256 views

Why are the inputs not changing the animation on keypress?

I have been following this tutorial. You can watch 16:00 - 18:20 to see what I am trying to do. What should be happening is: I press a key, my animation plays and the parameters or Inputs get updated ...
0
votes
1answer
48 views

Unity - 2D Platformer Controller responsiveness issue

I've been designing some basic controls for a 2D platformer and managed to get the feeling that I've been looking for when moving and jumping, but something is not quite right, it's not very ...
0
votes
0answers
6 views

Facebook Sdk got crash on initalization on Api Level Between 14 to 16

i have used Facebook sdk 7.13.0 its works find in some higher version of device in android but it will crash when it initialized in android version lower than 6.0 pls help..!!
0
votes
0answers
71 views

if the player moves in the real world the game object also want to move

I am creating an iOS game. It's my first experience in iOS. I am facing an issue in player movement. If the player moves in the real world this means the game object (character in the game) also wants ...
4
votes
1answer
244 views

Rotate perspective camera to align screen width to procedural object's width (Unity, C#)

I give up. After much trying and searching, I have to say I was unable to achieve the following task, for which I must call for your wise advice. In my current Unity 5 application (using C#), there ...
0
votes
1answer
73 views

Is there a way to make GUI.SelectionGrid expand horizontally

I am working on an inventory system, And I want to be able to make a Selection Gird that expands horizontally rather than vertically, is there an easy way to do this? Or will I have to create my own ...
1
vote
0answers
11 views

How to implement a network proximity checker in Unity using LLAPI?

I'm trying to implement a network proximity checker using my own functions in Unity, using LLAPI. How can I implemnet a network proximity checker, with similar functionalities than the ones in the ...
0
votes
1answer
294 views

Drawcall Batching with Ambient Occlusion

I'm creating a low poly 4X game that will likely have upwards of 200 unique hex tile models once everything is said and done. The colour palette consists of 16 different colours. I understand that if ...
1
vote
1answer
98 views

How can I call a RPC from a different class?

How to call RPC function from a different class? Let's say my code is ...
1
vote
0answers
20 views

Animations in Unity are not working properly

I've done a few animations in Blender for my 3D character but the problem is, that they look different in Unity. It seems like the eyes are moving too much. I tried to change many things in import ...
1
vote
1answer
334 views

Creating animation by script with animation assets

I'm very new to Unity (not to C# and programming as well) but I managed to achieve some goals very fast. But some concepts I still don't get in their full aspects. I'm developing a small multiplayer ...
0
votes
1answer
144 views

Implementation a Prefix tree or Trie in Unity C#

I am trying to make a word game in unity. The game shall be an online game with 4-6 players. The gameplay is somewhat like this: Suppose 4 players are playing the game- p1, p2, p3, and p4. All ...
0
votes
1answer
58 views

why my shader is black in the game mode?

I used this useful blending modes It's good but it just work in Editor mode. what is the problem?! ...
0
votes
0answers
55 views

OnCollisionStay() stops working suddenly?

Well, it´s more like deactivating. It is called at the beginning and some time after, but it just stops working without reason. Both objects have rigidbodies and colliders, so it´s not related with ...
0
votes
3answers
226 views
1
vote
0answers
15 views

Unity blit() not writing to RenderTexture

I found a nice Gaussian Blur shader online and am attempting to use it to blur a render texture using blit(). However, the render texture remains unblurred. I know for a fact the blur shader works as ...
1
vote
1answer
30 views

Why only few parts of the 2D sprite change their colour when I apply sprite color in Unity?

I'm making a stickman 2D game where I have different sprites for the player. But when I try to change the Sprite Renderer Color, it only changes few pixels of the sprite and the rest stays black as ...
0
votes
0answers
32 views

Use SVG or bitmap images? [on hold]

currently I'm creating a GUI for my first game in Unity and I'd like to know if I should use SVG-files instead of bitmap images. The reason why I ask is Unity seems to have some kind of SVG importer (...
5
votes
1answer
239 views

Adding functionality to make individual anchor points of bezier continuous or non-continuous

I am creating bezier curves with the following code. The curves can be extended to join several bezier curves by shift clicking in the scene view. My code has functionality for making the whole curve ...
-1
votes
0answers
24 views

Facial Recognition in Unity3D (C#) [on hold]

I'm new to Unity3D and game dev. Currently, I'm working on a game which would require facial recognition (not detection). The image of the face would have to be captured in real-time through a web ...
1
vote
1answer
4k views

Responsive (dynamically changing) Grid Layout Group cell sizes in Unity3D UI

I am trying to get my hands on the (not that) new UI system by experimenting a bit. I tried to do some Sudoku style layout. (cause lets start simple). Well, seems not that simple for me right now. ...
2
votes
3answers
173 views

Animation clip not working

I am working on playing different animation of key press.Below are the animation element attached to my player Initially run animation is played.I have written code to play "Jump" animation on ...
2
votes
3answers
265 views

Unity3D/Blender: Bounding box rotated on import

For some reason my bounding box is always tilted when i import to unity. I've checked for loose geometry and everything but there's nothing.
0
votes
1answer
687 views

How to restart the timer after using deltaTIme

I am creating a simple game interface, when fillAmount > 0, the timer will be stopped and reset. I want to restart the timer if the fillamount does not change for 3 seconds, all the code does now is ...
0
votes
1answer
18 views

Canvas Element Not Render In Proper Position

I don't know what's going wrong. The Text and Slider must be on the red square area. Anyone can help to determine this bug ? ...
0
votes
2answers
39 views

UNITY || How to access the “exit transitions” of the current played clip from the animator?

So, I have an animator , i can access it. But from there I have no idea how to access the clips inside. I need to access the transition of the clips. I got as far as accessing the object of the "...
0
votes
1answer
40 views

Unity3D: Constant Jittering when using Mecanim IK in game Mode

So I am trying to aim my player equipped flashlight at the mouse. It works good but there is some jittering when seen in game mode but none when seen in scene. Btw it is an FPS game. I am getting good ...
5
votes
2answers
659 views

Aligning pathfinding to the center of tiles?

I'm looking to achieve tile by tile movement in a project I'm working on. I employed the use of the asset Simply A* Path-finding to allow a unit to navigate the terrain. Since the tiles are simply ...
0
votes
1answer
586 views

Drawing a grid over a terrain using a mesh - Shader Depth and Z-Buffer

What I'm trying to achieve is rendering a (huge) tile grid over a terrain. For that I'm using a generated mesh of quads, one for every tile, whose vertices Y value is the same of the terrain to "shape"...
-1
votes
0answers
20 views

Migration from older Unity version to new [on hold]

I know that my question is weird but I'd really appreciate some opinions. I'm a Computer Science student close to getting my BS degree. I need to complete one project so one came up and I'd like your ...
7
votes
2answers
2k views

Creating a curved mesh on inside of sphere based on texture image coordinates

In Blender, I have created a sphere with a panoramic texture on the inside. I have also manually created a plane mesh (curved to match the size of the sphere) that sits on the inside wall where I can ...
1
vote
2answers
59 views

How to reset the score to 0 when reloading the game?

My scoring system uses DontDestroyOnLoad to persist between scenes: ...
1
vote
1answer
29 views

Using single Triggers on multiple controllers in Unity

After trying out a lot of stuff I finally need to surrender. Im having a project where I want to use the triggers of the Xbox Controllers seperately. To do so I added them as axis 9 and 10 in the ...
0
votes
2answers
3k views

OnApplicationPause()/OnApplicationFocus() in Android/IOs

I searched in Unity Documentation but there are no information. I'd like to know which methods is called and what it returns in the following scenarios on Android: App initially starts App goes in ...
0
votes
1answer
319 views

How can I render attack ranges as in this screenshot?

Divinity: Original Sin 2 has an amazing range-of-attack display. When I select a character's abilities, the range of the ability will appear (as shown in the screenshot below). I'd like to know how ...
2
votes
0answers
25 views

Object pooling in Multiplayer Game. Physics not synchronizing well

I implemented object pooling for my multiplayer project. Following Unity Manual I used custom spawn handler for shooting bullets. Bullets game object has rigidbody so selected Sync Rigibody 3D in ...
0
votes
1answer
37 views

Drag Object to Collide Unity

Please help, I am developing a 2D game for a school project and I want to drag the apple to the think box then when it collides, the apple will go back to the original position then it will add 1 ...
4
votes
1answer
277 views

Need an option to send camera output as video or frames in Unity3d 2017

Tools I've used in Unity 5.x are breaking my 2017 scene... and I do not see a way to output video or frames from Cinemachine (although I am trying to understand all of its features). What is the best ...
1
vote
0answers
29 views

How would I swap a character when a player touches a collider?

I wrote a simple script to attempt to do this and I created an empty game object and applied the script to it and dragged both of my sprites into my script and I receive no errors but nothing happens ...