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

No visible effect from additive animation layer

I want to rotate my spine using additive animations. But in the Unity animator it does nothing. So what should I do to make my animation work? I want to achieve something similar to this example from ...
0
votes
1answer
27 views

Cannot access an animation from script

I want to change the reload speed of my player when a button is pressed in the pause menu. I created a button and attached the following script to it (as suggested by the documentation here: https://...
0
votes
0answers
22 views

How to detect if a point is below a bounding box (thread-safe)?

I am trying to cast a shadow on a set of points in Unity that are below a BoxCollider object (have an x and z that would be in the box but y is below it). I ...
0
votes
0answers
20 views

Unity Terrain Grass/Detail distance. Draw distance is set to maximum but grass seems to magically appear ingame, what did i do wrong?

Hello all I am trying to learn more about using the Terrain editor in Unity. I want to add grass billboard style. It looks quite good up close, but it seems you can only set the draw distance to 250 ...
0
votes
0answers
20 views

Using stopwatch to adjust Coroutines running period

I usually see in the code base that we use Stopwatche to adjust coroutines running period in each frame. Questions: ...
0
votes
1answer
53 views

How to find the resulting angle of a ball hitting a wall in 2D

So there's a ball moving on a 2D plane with any vector. When it comes into contact with a collider, it should reflect in a linear fashion. What formula should be used in order to find the angle that ...
0
votes
1answer
63 views

Unity, tell matched players to go pick characters (Matchmaking)

I need to tell all the players in the match to go to some method that'd take them to character pick. The thing is that the pick happens inside the menu scene after the level get's preloaded (...
0
votes
0answers
37 views

Unity 5: How to make object trigger collision, but be able to go through the other object?

I have an object that rotates around my player. I have another object that is the enemy, trying to attack the player. I want the rotating object to object to collide with the enemy and take some of it'...
0
votes
1answer
49 views

How would I properly flip a character when they reach the edge of a ground object in Unity 2D?

The idea here is that the raycast shoots downwards from an empty game object and when it detects that there is no ground below it the character should bounce back and walk the other way. When I get to ...
0
votes
0answers
52 views

Player movement in forward as well as in Left-Right direction

I am trying to make a game in unity in which the player continuously jumps in the forward direction and moves left & right on swipe in android just like in one of the Ketchup game stairs. When I ...
0
votes
0answers
58 views

RPC and Command Calls OR Network messages for syncing variables across Server and Client?

I'm currently making a Unity Multiplayer game that relies on the synchronization of variables across the Server and the singular Client. I'm already able to use [SyncVar] to sync variables from the ...
1
vote
1answer
40 views

Can I apply a force to particles from a script?

I'm working on a game which involves streams of electrically-charged particles, being manipulated with electric and magnetic fields. Since I want a large number of small objects coming from an emitter ...
0
votes
0answers
36 views

How do I save a character selection in unity? [duplicate]

I am working on a 2D game that is going to released on Android. I am currently working on a character selection system and I have everything in place but I am trying to add a system where if the ...
0
votes
0answers
9 views

Unity Networking Meshes on Objects with NetworkIdentity Invisible

the title sums it up. Here's what I tried: I let the networkmanager spawn the playerprefab on start. The playerprefab has an empty gameobject attached which itself is the parent of all meshes that are ...
0
votes
2answers
105 views

Is there any way to keep the applied torques in the old planes, even if the ship's local plane has rotated?

I'm trying to make a space shooter game in Unity3D with realistic spaceship physics. I have a problem with correct rotations. When I apply torque in global coords system it will always apply them in ...
0
votes
1answer
35 views

Unity: How many Raycasts per Sphere Collider?

I understand that a simple sphere collider in Unity is a raycast in all directions with a certain length. How many Raycast events does a sphere collider trigger? At what degree increments are the rays ...
0
votes
1answer
37 views

Move camera while dragging with mouse

I'm currently trying to implement a move-to-drag behaviour in a 2d grid based game. I want to update the camera such that if follows the "head" of the trail being drawn - In this case, the nodes it is ...
2
votes
1answer
62 views

How can I express Logarithmic and Arithmetic spirals as segmented cubic bezier curves?

I am creating cubic bezier curves using this code from another question I asked. I would like to know how I can express Logarithmic and Arithmetic spirals as segmented cubic bezier curves.
0
votes
0answers
91 views

How can I keep fluid from falling out of a container?

How can I transfer liquid from one flask to another using Obi fluids or other assets in quick time for my virtual reality game? The liquid comes out of the emitter. But the fluid look is missing. It'...
0
votes
1answer
28 views

How can the fluid stream be stuck to the top of flask?

I created a flask and added a fluid stream to the top of the flask. When I translate the flask, the fluid stream goes along with the top of the flask. How do I achieve this when rotation occurs. <...
0
votes
1answer
55 views

Multiple Colour Gradient Lerp

I want to return a colour for a position t, given an arbitrary number of colour stops - a stop is comprised of a position, and a colour. Like selecting a colour from a multiple-colour gradient, ...
0
votes
0answers
23 views

Unity3D: What could be affecting my baked lighting?

I have a scene in which I have placed multiple sources of light in an apartment. After baking my lights, one of the rooms have strange smudges on the wall just above my window Here are the settings ...
0
votes
0answers
10 views

Missing header files when archiving xcode project built using Unity 2017.4

I created an AR app using Vuforia and Unity 2017.4. App works fine for android builds, but when I try to create build for ios, it always keep giving error that appcontroller.h not found. .I read a ...
0
votes
1answer
42 views

Unity3D: activeSelf issues

I've been trying to script some basic AI for a Unity Roll-A-Ball game, which involves two balls collecting cubes for points (one controlled by the player and the other controlled by AI. Everything ...
1
vote
2answers
79 views

Pong tutorial / Unity Logic question

I've been following this Pong tutorial, which is great: https://noobtuts.com/unity/2d-pong-game. The C#, unity components etc I understand. But what I am having trouble with is understanding the logic ...
0
votes
0answers
16 views

Does the Unity Editor have some sort of OnSceneSave() event or method?

For background, I am currently building an open-world game with what I usually call "story saves", or automatically triggered saves that remember where you were, what you had, and relevant world data ...
-1
votes
1answer
43 views
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 ...
1
vote
1answer
27 views

What does vertex:disp and tessellate:tessEdge mean? [Shader] [Unity]

I came across the following declaration on unity tutorial #pragma surface surf BlinnPhong addshadow fullforwardshadows vertex:disp tessellate:tessEdge nolightmap ...
0
votes
1answer
21 views

How do I preserve the image detail when making a texture? Unity

I have made a texture, set its shader to 'legacy shaders/diffuse' and dragged some images I like into the texture. When using the texture the images don't look as detailed as before. How can I ...
0
votes
1answer
14 views

Change layout of Unity's Project->Assets pane contents to show longer filenames?

I'm working on a project with assets that have really long filenames. I know about the slider in the lower-right corner of the Project->Assets pane, but THAT slider makes the icons absolutely HUGE &...
0
votes
0answers
21 views

In which folder are downloaded the objects from the asset store?

I use a Mac with Mojave and Unity 2018.2.14f1 Personal (64 bit). Every time I download something from the Asset Store from the first time, I have to hit a "Download" button and after an "Import" ...
0
votes
1answer
29 views

Object doesn't instantiated right spot

I have weird glitch in my game. When player shoot the gun, bullet is instantiated something called "ShootPoint" transform. This is the ShootPoint's position: And this is the code of firing bullet: <...
0
votes
0answers
42 views

“Unloading broken assembly” error when using the BioRadioSDK in Unity

I am developing an application using Unity which uses the BioRadioSDK. When I run it in visual studio it works fine, but when I run in Unity, I get this error: "Unloading broken assembly Assets/...
0
votes
0answers
25 views

Bake or not to bake, lights

Well, Im building an indoor level with several dynamic objects, but it's getting to expensive, I decided to bake the lights but to bake objects they have to be static... and these ones are dynamic ...
0
votes
0answers
20 views

Base class protected float value is different in child class?

I have a class Gun which has a protected float nextShotTime = 0. I inherited class Gun to <...
0
votes
1answer
28 views

Managers class losing reference to Game Manager when changing scene in Unity

I've got a singleton set up with a overarching Managers class that has references to each of my other managers classes. I also have a state machine set up that handles changing scenes between the ...
0
votes
0answers
11 views

Exporting Terrain Heightmap from Unity is black

For a current project I need to export my terrain's heightmap to pass the height information to my shader. When I use the "Export Raw..." feature under terrain settings, I get a black image. What am ...
0
votes
0answers
11 views

Problem in using multiple cylinder target on single scene

I am using unity vuforia for Augmented reality(AR) project. I created 2 cylinder target on vuforia and declared it on unity. if i place a single cylinder on the scene means it's working fine. if i ...
0
votes
0answers
20 views

Trying to limit localrotation between 2 values

I'm trying to limit a pivoting arm attached to my player to only turn between, for example, a 90 angle forward in local space. At the moment I have a smooth rotating script that I am trying to add to ...
0
votes
0answers
17 views

Transform.forward not facing forward after rotation and drifts

I have an object that has two scripts: ...
0
votes
0answers
46 views

Using Unity/Unreal as graphic engine while programming the game externally [duplicate]

My favorite language is C++ and I feel most comfortable to stick to it. I made a game in C++ primarily using the console output as a graphical interface: somewhat like that of dwarf fortress. ...
0
votes
1answer
58 views

How to check whether an angle lies within a specific negative to positive range?

I'm trying to develop a script that detects if an object's angles are tilting too much. I am new to Unity, and I am sure this is not the best way to test an object's angles, but I am trying to learn ...
0
votes
0answers
12 views

In maya, how to make root motion for exist skeleton

I see this video tutorial to make root motion animation, it need maya > hik > skeleton > hips translation I select "create control rig" and select "define", and load exist skeleton, it has no option ...
1
vote
1answer
54 views

Can I change previously unlocked game levels into locked locked by updating game?

I have 14 unlocked levels in my android game so that the player can play whichever he want. Can I make those 14 levels locked in next update? Players who previously reached 8th level would have to ...
1
vote
1answer
48 views

Avoiding GC Allocation in Unity UNet API

I'm trying to profile the game using Unity Profiler, I can see in the Hierarchy tab that there's an 18.3 KB correlated to ...
0
votes
1answer
54 views

How to calculate 1st, 2nd, 3rd place and draw conditions in local multiplayer game?

I have a local multiplayer game with an end of round screen that pops up after each round. I'm trying to figure out the logic to calculate the 1st, 2nd, 3rd place from a maximum of 4 players. I also ...
0
votes
1answer
87 views

How can I implement an infinite parallax background like in Slither.io?

I am trying to replicate the endless scrolling of slither.io but, I can't figure out how to implement it. Since the players can move to any direction and the background needs to be available during ...
18
votes
2answers
5k views

“The Object you want to Instantiate is null” But it works, can I ignore the error?

This has never happened to me so I'm a bit confused. GameObject someObject = Instantiate (Resources.Load ("Prefabs/Items/" + someName)) as GameObject; This ...
0
votes
1answer
42 views

How to change a background from a list of images on button click?

I'm trying to create a button within the settings menu that allows you to change the image of a GameObject per click. So, let's say there are only 2 different images available to choose from and it ...