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.

0
votes
1answer
45 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.
3
votes
3answers
37 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
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..!!
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 ...
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 ...
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
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 ...
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 ...
-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 ...
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 ...
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 ...
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 ...
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 (...
0
votes
0answers
12 views

Making first person animations for multiple hands

I'm a bit stuck in how to achieve a basic FPS Controller/System. What I want to achieve is the following: Rig and animate first person hands with gun attached in Blender (got that) Export ...
1
vote
1answer
30 views

Does it make sense to export and use skeletal animation as sprites?

As tools like Dragonbones, Spine lets you export animations as both sprite atlas and skeleton data (JSON/binary), I'm not sure which format to use when importing to Unity. I have few concerns: Will ...
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: ...
0
votes
1answer
23 views

Unity FPS style turning

I have this code: ...
0
votes
0answers
15 views

Initialize an object in property drawer based on an int variable in Unity

I have created following classes for my game in unity: ...
1
vote
1answer
23 views

Unity right mouse drag turn

How would I use my right mouse button to turn a player character in unity, while only turning in the direction and speed of the drag? Not sure if I'm meant to post this here or stackoverflow. EDIT: ...
0
votes
0answers
7 views

OnInspectorGUI Never called

The following code doesn't work, "What" is never logged out. ...
0
votes
1answer
39 views

Press f to interact with NPCs or objects

How do I change the method used for initiating the interaction. Instead of clicking object, check if within a certain radius of an object when you hit a key on your keyboard. If within 1 unit, the ...
0
votes
0answers
10 views

Help with Enemy pursuit script or follow player, endless runner type

Someone Should help me with a Script or code to integrate enemy to pursue player and then lag behind in speed, and if player speed reduces, it will catch up, like the normal enemy purse mechanics ...
0
votes
3answers
51 views

How to add collision to this script in Unity

I Want to be able to have collision were my player can't go through objects with colliders un Unity but I don't know how to make that happen, can you please help? ...
2
votes
0answers
32 views

How to properly write “stick to surface” character logic that handles unexpected large time deltas?

I've been trying to wrap my head around this issue: in a 2D platformer game (but this may as well apply to 3D games) I want the character to "stick" to the surface that it's moving along and at the ...
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 (...
0
votes
0answers
8 views

How to give and remove authority of an object between multiple clients (Or how to let the client controller push a rigidbody)

Just a little script to help anybody searching how to pass authority from a client to another when colliding with an object. I used it to let the player push a rigidbody cube with his rigidbody ...
0
votes
0answers
7 views

Export GameObject to IFC file fomat

I have some max model (fbx) object and some unity primitive objects. A user can view it in a unity player. Now i want to provide a feature to end user that they can export the unity game object to ...
0
votes
0answers
18 views

Animate character to walk beside NPC or object

I found a tutorial on youtube which is interacting with NPC and Items. My question is, how can I animate my character once the NPC or item is click. I want the character to move forward to the NPC or ...
-1
votes
1answer
42 views

How to use JavaScript language in unity?

I recently read somewhere that the unity engine supports JavaScript language but I have a question. How to use JavaScript language in unity engine?
0
votes
1answer
8 views

How do I override a SteamVR Controller's transforms in Unity?

I'm trying to provide an illusion to the user by rotating the controller about an arbitrary axis in the LateUpdate() method. But this doesn't seem to be having any effect as the controller probably is ...
0
votes
1answer
38 views

AdMob interstitial ads not showing after publishing in playstore

I have create a Unity game, 1st I add an AdMob interstitial ads script on game object then try on my main camera when I test in my mobile before publishing. It has worked like real time ads and ...
0
votes
0answers
14 views

Unity - export package - but on import, scene and folder structure are different (screenshots)

I export a package and shows me all the files I am exporting. When I go to import this package, one of the files is renamed and placed in a folder that no longer exists. Can anyone explain what is ...
0
votes
0answers
13 views

Unity C# Help With Distance Based Spawner

I am having issues creating a spawn system that relies on the distance of the last object spawned from the spawnpoint. I do not want to use a timer to determine when the next object is spawned but ...
0
votes
1answer
40 views

Enemy doesn't fire at player

My script looks pretty good but it says Target variable has not been assigned value. ...
0
votes
1answer
20 views

Make Unity GUI for mobile phones only?

I'm using Unity and I want to make a responsive GUI for portrait resolution only. Now I'd like to know if this is a good or bad idea when I force the user to play my game in portrait mode only. Shall ...
0
votes
1answer
17 views

Not getting proper height in unity when android device has notch or navigation bar on screen

Screen.height is not giving the proper resolution of an Android device when that device has a notch or navigation bar. Due to this there is offset at bottom of ...
0
votes
1answer
33 views

Where do components get added in Unity?

In unity's GameObject class, there are a few default data members. When we add a component to the game object, light for example, where exactly does it get added? Does it become a part of the ...
1
vote
0answers
30 views

How to make the hidden edges to be rendered as dashed lines and remove unnecessary diagonals in Wireframe shaders?

I am currently working on the wireframe shaders which is working. I managed to have some sort of dashed wire whenever the the edges is hidden from the view but I am having problem with certain views ...
0
votes
0answers
25 views

Wave spawner and word length

I'm trying to create a falling word typing game like z-type. I have used the code provided here : https://github.com/Brackeys/Falling-Words-Typing-Game In the WordSpawner.cs file, I'm trying to set ...
0
votes
2answers
68 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
0answers
21 views

Unity3D - How to create flat map render based on endless noise data

The Project I'm working actually on a Endless Map Generator (with chunks, height-map noise, threading system, etc..) This is actually what "dev data display" look like: The Goal Now I want to ...
1
vote
0answers
28 views

Realistic intensity of a sun in Unity to match the outside world

I am creating an ARCore application in Unity where I want to make lighting shadows that match the real lighting outside. For this, I have made a rotational directional light that simulations the ...
0
votes
0answers
19 views

How can I make this object Instantiate in a specific position?

I have a really simple script that instantiates objects when the "enemies" object has 0 children, it should spawn in the position of EnemyT, but they fall through ...
0
votes
2answers
54 views

Pathfinding How to store data for big terrain size

I am trying to implement my own pathfinding solution in unity but cant figures out how to store data. Following is my grid class which stores height, length and neighbour tile of tile. ...
0
votes
1answer
27 views

Unity - Button still interactable even when interactable is set to false

my button can still be pressed in-game even if I set it to button.interactable = false; What I'm trying to achieve is when the Panel ...
-1
votes
0answers
32 views

Modular Program Structure

My question is, which Diagram can best express this statement "Develop a modular program structure and explain the relationships between the modules"..Project is Game development.. It's for my SDS..
1
vote
2answers
29 views

LOD culled gameobject still interacts with raycast

The camera is sort of top down and the player can move objects around, rotate them, delete them etc. I use a raycast to check what was hit when the player clicks. But some objects are culled by the ...