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.

3,873 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11 votes
3 answers
3k views

Why do prefabs speed up loading?

I have a scene with a massive terrain. It took a long time to load (approximately 60 seconds) when I pressed play. I am in the editor. I prefabbed it. Now it only took about 5 seconds to load when ...
Evorlor's user avatar
  • 5,793
10 votes
1 answer
3k views

How can I Implement spin in billiard game?

I'm not sure that you played billiard or snooker before.if you played you should know about spin. but anyway if you don't know about it you can see it in this video I want to Implement spin like this ...
Seyed Morteza Kamali's user avatar
9 votes
2 answers
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 ...
user5025's user avatar
  • 201
8 votes
1 answer
369 views

How to move a portion of bezier/spline curve along its complete bezier/spline curve?

Based on the image below, I have a curve (orange) which is a bezier sub-curve of an original curve (longer black curve). The original curve consists of a number of cubic bezier curves joined together. ...
NotEveryDay's user avatar
8 votes
1 answer
229 views

How to create an illustrator/photoshop-like pentool for creating bezier curves in Unity

I found a very useful bezier curve creation code here, which I am using. I need to create complex segmented bezier curves so I want update the code to create illustrator/photoshop-like pen tool bezier ...
hutfelt's user avatar
  • 213
8 votes
4 answers
10k views

Handling movement on sloped surfaces - clamping character to sloped surface

I've noticed that a lot of people seem to have this issue but I've yet to find an actual working solution - when a rigidbody-based character controller (I'm not using Unity's character controller) ...
katsuragi545's user avatar
7 votes
1 answer
2k views

Unity 5.3.5 - How to setup a lobby with general game settings?

I am currently working on the lobby for my game. I have followed these tutorials (https://www.youtube.com/watch?v=jklWlm5v21k), which were very helpful, and was able to setup my lobby like this. The ...
Jasper's user avatar
  • 133
7 votes
2 answers
1k 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 ...
user4985's user avatar
  • 165
6 votes
2 answers
1k views

Interpolating between positions unfeasible at 30 frames per second?

I am working on a 3D platformer in Unity and I am targeting Android devices. The game consists of a lot of objects smoothly interpolating from the bottom of the screen to the top. This whole time I'...
TheSaviour's user avatar
6 votes
0 answers
721 views

Procedurally generated paths with intersections

The Problem I've been attempting to create some procedurally generated paths for a while now, but I've reached a problem when it comes to generating the intersections of the paths. The paths are ...
Daniel Holst's user avatar
6 votes
1 answer
552 views

Orthographic Camera is not Occlusion Culling?

In the scene where the occlusion culling is done as desired, When I change the camera to orthographic, occlusion culling is not done. (Look at the sphere the red arrow points to on the right) What ...
mjk6026's user avatar
  • 246
6 votes
1 answer
3k views

How do I reduce overdraw in a forest scene with lots of foliage?

Unity comes with an overdraw view that looks something like this: We've probably all seen it, and have probably been advised to check for overdraw. How do you go about actually doing anything about ...
eclmist's user avatar
  • 1,153
6 votes
2 answers
8k views

Unity - Water Cube (to 2D game)

I wonder if you can create a cube of water within the unity! I'm starting to use the Unity, and took a sought as to whether there was already something like this ... but have not found any tutorial ...
Igor's user avatar
  • 219
5 votes
2 answers
1k views

Positioning items / clothes on character

I'm aware that in Unity, when you want to add (e.g.) a weapon to a character, you parent it to the "hand" bone of the character etc... Well I'm trying to add a hat to a character in unity when it's ...
B''H Bi'ezras -- Boruch Hashem's user avatar
5 votes
1 answer
1k views

How to rotate a parent object while rotating a child object to a certain angle using coroutines

I have a semicircle like game object which I made by putting two arcs in an empty game object (SCircle) and rotating the 15° (for left arc) and -15° (for right arc) as seen below. ...
Bane's user avatar
  • 261
5 votes
1 answer
501 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 ...
rcgauer's user avatar
  • 161
5 votes
0 answers
290 views

How to force play area corners to Lighthouses in Unity

I'm working for a guy that wants to recreate real environments in VR and superpose them for business demos. Think of one of those mall kiosks where you "enter virtual reality" and at first it looks ...
Althis's user avatar
  • 139
5 votes
0 answers
4k views

How do I make the PS4 controller vibrate in Unity3D on mac?

I am currently working on a 2D game in Unity3D with an option to play with a gamepad/controller. I would like the PS4/dualshock 4 controller to vibrate. I am on mac. I have looked into Xinput but I ...
RER1200's user avatar
  • 51
5 votes
0 answers
2k views

Unity 2D: How to make player grab a ledge, swing and jump to another

Since I'm not a native speaker, it's hard to explain in english what I want to achieve, so I'm gonna use a couple of images... basically I want to make an interaction of this type: in a 2D game, so ...
daveoncode's user avatar
5 votes
1 answer
2k views

Unity Capture And Display Live Camera Feed

I want to display the video using the device camera on specific part of the screen on iOS, android and Editor. I was able to find the WebCamTexture which display the camera video on the Quad (3D ...
Zohaib Javed's user avatar
5 votes
0 answers
2k views

Unity3D LLAPI and Pyhton UDP communication

I need a Unity3D game on Android to receive UDP packages from a Python script running on a different device. Using System.Net is not (yet) an option, as it is only supported on Android with a valid ...
mitras2's user avatar
  • 51
5 votes
1 answer
4k views

Can't clip a sprite that has a custom shader in NGUI

I am using NGUI. I have an "NGUI Unity 2D Sprite". This sprite has a material with this shader: ...
Saturn's user avatar
  • 1,771
5 votes
1 answer
2k views

Avoidance Steering Behavior acting inappropriately

I've been trying to implement this steering behavior in Unity: Understanding Steering Behaviors: Collision Avoidance However, I'm getting strange results. Here's the code for the script, feel free to ...
GelatinFox's user avatar
5 votes
1 answer
3k views

Input.GetAxis("Horizontal") not updating

I'm having trouble with Unity's basic character controlling. After i implemented the crouching in the code below the Input.GetAxis("Horizontal") does not update (while the left control is pressed (...
user3629146's user avatar
4 votes
0 answers
77 views

Simple shader to draw lights on a skyscraper

I have some basic shapes in the background of a scene that represent a small city. There is a stage where the scene becomes a nights scene. I would like to have the city come to life at night with ...
Charl Cillie's user avatar
4 votes
0 answers
659 views

How to validate an Exception occurred as expected in a Unity Test?

I am trying to write unit tests in Unity that assert that logs, errors, and exceptions are raised as expected in my code, but I'm getting inconsistent results. I'm using ...
Just_Alex's user avatar
  • 141
4 votes
0 answers
78 views

Reuse assets across different rendering pipelines

What is the best way to handle same project with two rendering pipelines that share 99% of the Assets? We have one really big project for which we've decided to try and use both the URP and HDRP ...
Bobby Tables's user avatar
4 votes
0 answers
2k views

What is the most appropriate way to achieve synchronous Addressable asset loading?

I am transitioning my project from Resources to Addressables. Some parts of my game just aren't worth doing asynchronously, and ...
Saturn's user avatar
  • 1,771
4 votes
0 answers
855 views

What's the "right way" to open a websocket connection inside WebGL?

The official Unity documentation says that, to run websockets in the WebGL player, you should use this plugin on the Asset Store. Unfortunately, following that link leads to a notice that this asset ...
Mason Wheeler's user avatar
4 votes
0 answers
1k views

Game built uses a lot of GPU processing, in the editor uses very little

I am building my project in Unity 2018.2.21f1 for Windows in architecture x86_64, with: Copy PDB files | false Create Visual Studio Solution | false Develoment Build | false Autoconnector Profile | ...
LOOKM's user avatar
  • 83
4 votes
0 answers
274 views

Unity3d: calling a web service in unity editor works, but not in standalone. Why?

I have this line of code: SDE3D _webService = new SDE3D(); int result = _webService.UserLogin(txtLoginUsername.text, hashString); My ...
stighy's user avatar
  • 427
4 votes
0 answers
273 views

Is it possible to capture screenshots in headless (no graphics) mode in unity?

I am trying to capture screenshots while running unity simulation in headless mode (no graphics), if anybody tried to do the same and it worked, please share how could you make it work.
NAnn's user avatar
  • 339
4 votes
0 answers
268 views

Moving directional light cause huge fps drop: why?

I've implemented a simple script to simulate Sun Rotation (day/night cycle). In my "Update" i Rotate main Directional Light (the sun). What i've noticed is that my FPS dropped from 60 to 20-25 fps. ...
stighy's user avatar
  • 427
4 votes
0 answers
350 views

Networking and physics

Context I have been implementing my own networking for a third person multiplayer game, but controls and physics will be ala old school FPSs. I'm using Unity's transport layer, which allows me to ...
Leo's user avatar
  • 1,585
4 votes
1 answer
167 views

Encapsulating parameterised prefabs

I'm currently using the following general pattern for most of my configurable components (i.e. MonoBehaviours): ...
Martin Ender's user avatar
4 votes
0 answers
524 views

How to animate an arc from the middle in both directions

I have been able to make an arc that animates from one end to another using the following coroutine: ...
Hilarious404's user avatar
4 votes
0 answers
864 views

Why do I get incorrect bounding boxes when I add a cloth component in Unity 2017.3?

I have a character with a cloth. The cloth is separated into its own mesh, but both the cloth and the character are in the same FBX import. The cloth is correctly skinned to the char so it moves with ...
Uri Popov's user avatar
  • 3,017
4 votes
0 answers
537 views

Why am I getting errors like these when trying to build my app

I am currently trying to build and publish my app to the universal windows platform halfway through the process of doing so, during the validation process I got stopped with these errors. The 1st one ...
Jayson Meribe's user avatar
4 votes
0 answers
58 views

Send mesh to a video card with the help of ngui instead of DragonBones in Unity

I am working at the project. It is pretty huge. And there is ngui at its core, so I can not go away from it (from ngui). Now I am assigned to incorporate the DragonBones into the project. There are ...
cutMeDown's user avatar
  • 107
4 votes
0 answers
140 views

Critical input from server arrives late... it must not!

To preface, my understanding of networking is mostly from Source Multiplayer Networking and 1000 Archers on a 28.8. For various reasons I have decided to go with a client-server model instead of peer-...
user avatar
4 votes
0 answers
687 views

What is the optimal scene size?

I'm coding a small "Binding of Isaac"-like game, with a little help from the official "Scavengers" Unity tutorial, since it's my first game. In the tutorial every level is ...
FFN's user avatar
  • 181
4 votes
0 answers
37 views

Upon import, isosphere is missing

To build my tank for a Unity game, I am using Blender. Currently, I am making a turret consisting of an isosphere with half of the faces removed (I needed the bottom to be "flat") with some minor ...
Anthony Pham's user avatar
4 votes
0 answers
1k views

Are there performance benefits to using WaitForSeconds vs checking elapsed time in FixedUpdate in Unity?

I was considering that perhaps just checking the time and then doing some work in the Update function might look cleaner than calculating how long to wait for and calling yield new WaitForSeconds() on ...
James Joshua Street's user avatar
4 votes
0 answers
3k views

Run Unity standalone in Headless Mode whilst capturing screenshots

I need to create a unity project which runs in Headless mode (using the -batchmode command), but it must capture screenshots e.g. every one second and write them out to a file. I understand that in ...
Ben Hayward's user avatar
4 votes
0 answers
677 views

Rendering hundreds of animated characters in Unity3D

I am currently doing some research in anticipation of the development of a game where there are going to be hundreds of secondary entities which will interact with the player and among themselves (...
Marc Jacob's user avatar
4 votes
0 answers
362 views

Blend Tree animation problems at rotation

I have a Blend tree animation with two floats ( VelocityX, VelocityZ) that have idle, run , run right, run left , I use a pad to move it at world space When VelocityX is -1 it run left, +1 it run ...
D4rWiNS's user avatar
  • 293
4 votes
0 answers
814 views

Render live MJPEG stream on a plane in Unity

I'm trying to display a live video stream as a texture in Unity. It comes from a Raspberry Pi using motion and encoded as MJPEG. Is there an easy way to implement ...
eden881's user avatar
  • 141
4 votes
0 answers
2k views

Particle system appear inside UI?

How to make the particle system appear inside the Canvas ? No need for unity store assets. I'm using Unity 5.5.0
user43474's user avatar
  • 537
4 votes
0 answers
3k views

Overlap transparent particles without blending? (Unity)

I'm trying to create a continuous output of light from an object (like the exhaust of a space ship), and I thought I'd use particles to achieve this. But I'm running into a problem with alpha blending....
eternal's user avatar
  • 341
4 votes
1 answer
5k views

Global fog does not work with deferred rendering in Unity

When I set deferred rendering the global fog from the Unity Standard Assets does not work, there is no fog at all. With forward rendering the global fog works. How do I add fog with deferred rendering?...
Magnus's user avatar
  • 159

1
2 3 4 5
78