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.

learn more… | top users | synonyms (1)

1
vote
0answers
23 views

Unity Shader blending colors and color values above 1

I have source images where each pixel is one of exactly 4 colors: red = (1,0,0) green = (0,1,0) blue = (0,0,1) black = (0,0,0) I'm trying to modify Unity's default sprite shader to use those ...
0
votes
1answer
32 views

Unity NavMesh Step Issue

I have a scene in my game that takes place in a subway. I created a NavMesh so I can easily have the enemies chase the player. There seems to be a problem though as them enemies sometimes have a ...
0
votes
2answers
46 views

Why can I not change a Sprite directly? [closed]

I am changing the Sprites on an array of Images. I could think of two ways to go about it. The first way being: var images = GetComponentsInChildren<Image>(); foreach(var image in images) { ...
1
vote
1answer
43 views

How to increase the difficulty setting as close as possible to maximum difficulty automatically?

I have a simple 2D version of Mini-golf. The goal is to manage to clear each level in the least amount of shots, the ball is bouncing at most 3 times (stops on the 4th hit) from a wall but not ...
0
votes
2answers
46 views

Collider Effeciency Question

I'm creating a game where hundreds of rockets with colliders attached are shooting at a player. Should I write my script where: 1: The player script reads the collision from hundreds of rocket ...
3
votes
0answers
17 views

How to activate GearVR Menu in my own Unity-Apps?

So in normal GearVr-Apps, which you can download from the marketplace, you can activate the GearVr Menu to control brightness etc. with a long click on the back button. But this does not work for all ...
1
vote
2answers
36 views

Apply two animation on one object in unity

I am looking for a perfect example to apply two animation on same object and to run those animations simultaneously. In my game, a player is jumping as well as flapping. As per my research, I have got ...
3
votes
1answer
42 views

Reflection areas on texture

I have a wheel model. It's use Reflected Diffuse shader and only one texture and only one material. So it should seen like that, right? But it's seen like that: I'm really curious about that. What ...
0
votes
0answers
57 views

Unity UI Drag and Drop with conditionals

I have a nice UI drag and drop system (big thanks to quill18 and BoredMormon for their tutorials) and want to get some conditionals in it. I have 4 numbers (that are instantiated on the canvas) that I ...
3
votes
1answer
43 views

How can I get Unity to tell me the battery status of my OS X laptop?

How do I get battery status on an OS X laptop in Unity? This is un-Googlable: I keep finding either mobile stuff (iOS or Android) or people complaining about laptop battery life.
3
votes
0answers
55 views

getting an error while building the Game in an Android Phone

I placed an Admob Plugin in my game. Then I import gamedonia SDK for facebook connection and Push notification. in editor its working fine. While compailing it in an Android Phone it generate an ...
0
votes
2answers
69 views

Prevent player from jumping on a mesh

I am working on a game and I have a mesh that I use to block hallways and prevent the player from going that direction. They are placed vertically with slight angles. I'm having a problem that the ...
0
votes
0answers
16 views

unity null error excetion on array after I referenced it in another script

I am trying to make a array of bools to determine if someone has bought a skin. Using the same setup as for determining if user has bought other objects, but this stopped working and is giving null ...
0
votes
0answers
30 views

Unexpected Execution Order in Unity (uNet)

I made a little game in Unity. It works fine in the Editor. But if I run the build version I get a NullReferenceException. This problem does only appear if the build-version-client hosts the game. ...
-1
votes
2answers
77 views

Most Efficient Way to Store player stats/data in Unity C#?

I am looking at storing player data in Unity from a script that I'm writing in C# and I would like to get an opinion on the best way to store the player's stats/data about the player like hours ...
1
vote
1answer
28 views

Mesh/Path reduction to simulate traveled path to target

I generate that kind of mesh during runtime to display the path to follow to a target (think at something like the path your GPS shows you when you are travelling): I need to reduce the displayed ...
0
votes
1answer
28 views

the tree couldn't be instanced because the prefab contains no valid mesh renderer

I am beginner in unity and i imported a package tree from website and when i add a tree from the package then it show me that the tree couldn't be instanced because the prefab contains no valid mesh ...
0
votes
0answers
43 views

Turning a 2D characeter to face left or right.

This question might get flagged to be opinion based but I really need help with what decision to make. So far i know of the following ways to turn a 2D character to face the other directions (in my ...
0
votes
1answer
22 views

Invisible mesh. Are my normals, normal?

I'm creating this mesh during runtime in Unity3D. The mesh shape is ok, but as you can see on this screenshot, the mesh is not correctly rendered: it's only rendered when the camera is looking back ...
0
votes
3answers
55 views

Unity method to get a vector, which is x seconds behind another moving vector (A bit like TrailRenderer)

I want a function, which lets me follow a vector with a bit offset or delay, like it's done in the TrailRenderer. I tried to achieve this with the Lerp function, but that didn't work for me like I ...
0
votes
1answer
24 views

Unity move canvas slightly with smartphone acceleration

I'm developing an AR-App with the Samsung-GearVR. To get a smooth UI, I thought about creating a UI, which is not completely fix, I thought it could be nice, when the UI is slightly behind my head ...
1
vote
0answers
30 views

Constant orbit using Rigidbody in Unity

I'm trying to make a few game objects (moons) orbit a planet in unity. Basically just picture a planet in the center of the screen, and a few small moons that orbit the planet with a constant ...
0
votes
0answers
27 views

Unity terrain quality

I've created a new project in Unity 5.3.4 (this problem has also happened since unity 5.3.2 an other versions) and when i initally make and sculpt my terrrain, the quality, shadows, specularity and ...
0
votes
0answers
34 views

Using the perlin noise of unity efficiently?

I have a little problem with my perlin noise values. It is generating a voxel mesh, that is flat. Here is a picture that demonstrates what I mean: As you can see, the terrain lacks any ...
0
votes
0answers
28 views

Dealing with floating point imprecisions in a 2D Tiled based game

I'm using unity3d to create a little horizontal tile based platformer game. My entities have a rectangle defining their collision volume. On the other hand I'm using a camera configured to 1 unit = ...
0
votes
1answer
35 views

Player collision with object

so I have an fps controller, and I want to change camera when it collides with a box collider. I think I did it properly but it didn't work. Here's my code. using UnityEngine; using ...
1
vote
1answer
43 views

Why are there aliasing artifacts with my text?

I am using a World Space Canvas, with a UI Text on it, using the Outline script, to produce the following text. I'm noticing a number of strange artifacts on the text, as seen below. Note for instance ...
0
votes
1answer
82 views

Poker Game Multiplayer network logic

I created a single player poker game. Now I want to change it to a network game. I want to use Photon(for network) and Playfab(game server) or SmartFoxServer. My problem: I want to run important ...
0
votes
2answers
44 views

How to address raycast failures due to tiny holes in a mesh?

Problem: I have a racing circuit that is made out of tiles, each of which is made out of 2 triangles. I need to know over which tile my craft is hovering on; but since there are tiny holes between ...
0
votes
2answers
41 views

Overriding CoRoutine doesn't execute base code

I want to have a CoRoutine declared as virtual in parent class and then overridden in child classes. protected override IEnumerator f(Vector3 to) { ... yield return base.f(to); ... } What ...
6
votes
3answers
153 views

How to limit and direct player's view in VR?

We are making a VR game where the player will look at the world through the eyes of his character who sometimes moves on his own, so the player is only observer. The character will rotate his body ...
0
votes
0answers
14 views

How can I get an asset for my ObjectField?

I am trying to learn how to use ScriptableObjects. I have an ObjectField: Foo myFoo = null; myFoo = EditorGUILayout.ObjectField("My Foo", myFoo, typeof(Foo), true) as Foo; I have a Foo in my Scene ...
2
votes
1answer
61 views

How to render multiple projections of an object?

I want to display multiple projection of an object on the same screen. The projection should also change as the body rotates, kind of a dynamic projection of the body. I am trying to make a character ...
0
votes
0answers
22 views

Why aren't .blend files importing into unity?

So I for the past week or so I have been having extreme difficulty trying to import .blend file that I made into unity. When I either drag or import the .blend file into unity I automatically get a ...
0
votes
2answers
40 views

Why is my canvas being rendered underneath everything?

I'm currently trying to implement a UI that will overlay a scene and follow a scene's main camera, but I'm running into some issues. When I set canvas's mode to Screen Space - Camera, the Z position ...
0
votes
0answers
6 views

Unity 3d Js head bone rotations

There is another version of Head Look script (link here, and code below) https://xenoaisam.com/2015/04/28/unity3d-eye-focus-and-head-look/ This is a simpler open source code that works better with ...
5
votes
3answers
197 views

Understanding Scriptable Objects

I am trying to understand the logic and functionality behind Scriptable Objects. I 've watched the provided video 2 times and I keep getting lost. I tried to follow the code as well but with no luck. ...
0
votes
0answers
18 views

Calculating wheel spin for players over network

I am creating a game in unity 3d that uses google play's real time multiplayer service. The game has cars that drive around and I am trying to figure out how to apply a rotation to the opponents' ...
0
votes
1answer
8 views

Wrong pivot point of parent / wrong scale of children

I'm trying to make two objects, in is an intact glass, the other one is the glass but shattered. So for the shattered glass, in Maya I make a Plane, cut it with the multi-cut tool, extrude the faces, ...
0
votes
1answer
39 views

How do I reference one gameObject with script attached to other?

this is all in Unity 3D with C#. Thing is, I have attached a script to my player that should Destroy TreeGroup (as in forest) whenever I press 'Q' and Instantiate them when I press 'E'. Here is the ...
1
vote
0answers
13 views

Why scale of my new UI texture differs so much comparing to other GUI elements?

I have created an UI Texture and set Texture to my .png file. The size was only 256x256 but in the canvas it appears huge. I can change it to minimum 2x2 which is still big. If I compare it to other ...
0
votes
0answers
143 views

What is the proper way to get input from the motion controllers touch pads?

I've been trying to figure out how to get the inputs from the touch pads on the motion controllers but have yet to find out how to do so. Initially I tried doing the following (as it was how I ...
-2
votes
0answers
23 views

Is there a simple way to create a hole in an object in unity [duplicate]

I need to create a hole in a wall for one of my projects, but I'm not quite sure how to do in a way that would be relatively simple without exporting a model into another program.
0
votes
0answers
29 views

Unity Editor windows went black

I recently bought a new laptop, with Intel i5-5200U HD graphics 5500 and AMD Radeon R5 M230 2GB and 8gb ram, and heres what happens with my Unity: If open it, minimize it and then maximize again, ...
1
vote
1answer
49 views

Would I need to delete unused assets from my Unity packaged build?

I'm going to make a release for my Unity game. Does Unity include unused assets in build output? Would removing unused assets from a project reduce build size/Time? I want to know if Unity packages ...
0
votes
2answers
33 views

Roatating a Game Object downward

In my game I have a rocket which is traveling horizontally across the screen. What I am trying to do is when the player runs out of fuel, the rockets engine stops (already coded) and then the rocket ...
1
vote
0answers
78 views

Design pattern for RTS game. Is this good or bad?

I've been plugging away at an RTS framework for a few weeks now and I've decided to try out a basic MVC design pattern for Unity based on This Article Anyway I guess I'm just looking for opinions ...
0
votes
2answers
80 views

Flipping car animation with coroutine not functioning properly

I am creating a game in unity 3d that has to do with cars. If you double jump and you are holding the joystick in a certain direction then the car will flip that direction (360 degree flip). I am ...
0
votes
1answer
25 views

Scale one object to be cover multiple other objects

I have placed and aligned several objects next to each other. For the sake of understanding, lets just say I placed 10 cubes next to each other. I snapped them all together (Move->V->Click&Drag). ...
3
votes
1answer
229 views

Unity too many batches

There are 64k cubes, 64k-1 's materials are assigned to sharedMaterial of first cube. But unity is not batching them together. Only cubes themselves are batched. Static color(but different per cube) ...