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
1answer
61 views

Why does my initial screen disappear quickly in my iOS build, in my Unity game?

I'm developing a game in Android and iOS platforms. I've an initial screen and I'm trying to get next menu scene after a delay of 4 seconds. It works ok in Android but in iPhone, the initial scene ...
3
votes
0answers
62 views

Particle-system in the GPU in Unity: how to load/store data from/to a texture in the shader?

I have been implementing a simple GPU-based particle system in Unity, for my current game. The setup is indeed not very elaborated: the shader receives a set of coordinates passed trough the position ...
0
votes
1answer
102 views

Lerp vs. Animation

I've read a few posts regarding lerp and animation, but none seemingly fully answer my question - or I'm not reading into them correctly. Lets say I have a box in a game. This box has a lid, and the ...
0
votes
2answers
61 views

Finding Game Object with Regular Expressions

Is there a way to use a Regular expression in the GameObject.Find() method? I'm making a checkers game and I've got pieces named Red Piece (x,y) and White Piece (x,y) (where x & y are actual ...
3
votes
2answers
139 views

Bullet holes on curved surfaces and corners

So right now I am making an FPS game where the gun creates bullet holes (plane with texture) on impact, but there is a problem with that, if I shoot at the edge the plane will stick out and also ...
3
votes
1answer
34 views

Main Controller dont destroy on load

I would like to have a Main Controller class that should exist in many scenes. I used DontDestroyOnLoad and in runtime an object associated with this class is present in hierarchy. However, how can I ...
0
votes
2answers
116 views

Why are my click events being fired many times for every click?

I am working on a game in unity where a user will click a button to gain coins and clicks over a lifetime of clicking the button but the code is making the clicks go up by a lot instead of just 1 each ...
0
votes
0answers
32 views

Unity 3D - Tags not Working

I have triggers that interact with planes, each individual plane has a specific tag. The problem is, that it seems to just detect all planes but one called "Middle Plane" Here is the link of the ...
0
votes
0answers
18 views

How to draw things on top of objects drawn in OnRenderObject()?

I am using Unity, here is the method in question. So I know this method draws objects after the camera is done rendering the scene. I have not come across a way in Unity to draw these objects in a ...
0
votes
1answer
16 views

Keep the prefab connection with FBX

The steps I have perform: Added an Fbx to UnityProject FBX added to scene hirarchy I made Prefab of That Scene Object(previously imported FBX Object) Everything is working fine. I did assignment ...
-1
votes
1answer
38 views

GetComponent doesn't works

I have a Halo component on an object, on the same object I have a script, in the script I tried to get the Halo component, but the GetComponent< Halo >() doesn't work, it says that it can't be ...
0
votes
0answers
27 views

Problems with imported model animation from Blender to Unity

I've downloaded a free sculpted arm and created my own rig and animation for it in Blender. So here is how it looks like in Blender : And the model itself looks fine in Unity, but as soon as the ...
2
votes
1answer
183 views

An invisible object that deletes anything behind it?

I am using augmented reality to put a 3D object on top of a "camera detected" object. The 3D object can be though of as leaves that go above the real world object but also fall in front / behind / on ...
0
votes
0answers
15 views

Setting a destination to Nav mesh agent but the character moves around the edges of the walkable area

I created a character. Added character controller, rigidbody and nav mesh agent. On right click I get the position clicked using raycasting and set the hit point as the destination for nav mesh ...
0
votes
3answers
53 views

C# Integer limits for Scriptable Objects

I am experimenting with Scriptable Objects in Unity. In the following example how can I limit the range of accepted values? public class AScriptableObject : ScriptableObject { public uint damage; ...
0
votes
1answer
82 views

Why do my trees share the same health?

My trees keep on falling at the same time and I am not sure why! I am new to Unity3D javascript. Here is my script: #pragma strict //INTS var health = 5; //GAMEOBJECTS var tree : ...
0
votes
0answers
22 views

Access Terrain data more efficiently

I'm developing an editor tool for terrains. I want to do some calculation every time the terrain is modified by user. Currently I get heightmap with these: TerrainData tData = ...
0
votes
2answers
31 views

Tag for Moving platform

My character is not sticking on the platform when jumping on it but I don't know why. Here is the code: void OnCollisionEnter2D(Collision2D other){ if (other.transform.tag == "MovingPlatform") { ...
0
votes
0answers
36 views

unity UI buttons staying highlighted after touch

i have a touch dpad giving me some weird issues i havent experienced in older versions of unity. after building the game and running on android i am noticing that some touches to the dpad are leaving ...
1
vote
3answers
56 views

Unity 2D, how to turn a bool true, after a set amount of time?

I have an enemy working to damage the player when they stay in collision for too long, at the moment, the enemy will attack about 30 times per second, however I want there to be a delay between each ...
0
votes
0answers
13 views

Moving the rendered object/the projection perspectives based on an AR marker

I saw this video and now I am trying to making it. I have used Vuforia AR Camera Pulgin, and so far tracked the image on a marker but the problem is getting the four projections of the 3D object on a ...
0
votes
0answers
31 views

UNITY 3D - Get X and Y components relative to a value and an angle

I have an algorithm, that, once the gameObject collides with a trigger, a method is called, on which the current collectibles (almonds) picked are instanciated around the circular area of the ...
0
votes
0answers
14 views

Unity3D c# get animation playback position AFTER it is stopped

As title says, i'm having trouble determining playback position of legacy animation after it has normally finished playing or has been stopped. Here is a oversimplified demonstration: //how i get ...
0
votes
0answers
20 views

How to apply individual colours in a fragment shader?

I'm trying to write my own shader. Within the target mesh I have assigned the following attributes in a script: mesh.vertices = points; mesh.colors = colours; //Each element of the array hold a ...
0
votes
1answer
22 views

Making Scene at editor mode

On Button click at editor mode I am trying to make a scene of selected Hierarchy game-object but the problem is as i click the button new scene become upon and I lost the scene where i were ...
1
vote
0answers
23 views

Hinge/Configurable Joint rotating even if constrained

I already posted the question over on Unity forums, though, I have to say, this place often seems more professional and knowledgable, so here goes mirror post. I have a Cylinder with a Hinge and a ...
-3
votes
2answers
76 views

Is it possible to use Java as a scripting language in unity? [duplicate]

I wonder if its possible to use Java as a scripting language in unity to create a basic 2d game?
3
votes
1answer
52 views

How to sync new object (weapons/bullet) in a multiplayer photon game ?

I'm using Photon to develop a multiplayer game. I would like to know the best way to synchronize "weapons" bullets object between network players. Thanks
0
votes
0answers
19 views

Unity Engine - Move the Object According to Image tracking [duplicate]

Motive : Want to develop Software which will track the Pad and move the four views of object accordingly. What I did/Current Knowledge : I had placed the four camera around the object and change their ...
0
votes
0answers
22 views

Placing Plugins for sqlite in Unity Projects

I am developing a demo for Sqlite database for android platform. I've placed following files in my project. Mono.Data.Sqlite.dll sqlite3.dll System.Data.dll libsqlite3.so It is working fine in ...
1
vote
1answer
84 views

Unity3D: Making heavy calculation on separate thread [duplicate]

So, I've created a program with Kinect as its input. As you know, Kinect will send the data 30 frame per second. I have a model that will mimic Kinect's input motion, so on Update() I read the ...
2
votes
1answer
87 views

How to create a looping or spherical world?

I wish to create a 3D first person world, in which the player, once they reach one end of the map are unknowingly transported back to the opposite end, or a spherical world with a surface where the ...
1
vote
1answer
50 views

How to get color or value from material with shader?

I have a sphere with a shader with colors for specific heights and I want to get the value at the cursor(height) or color of the point the cursor is on when clicked. Is there a good way to get this ...
0
votes
0answers
47 views

How to fix il2cpp.exe error for webgl

So I'm trying to build my project for webgl platform and it's throwing an exception which I don't know how to fix because it seems how some low level staff. Please help stdout: Building ...
0
votes
0answers
20 views

Discrepancy with Profiler.GetTotalAllocatedMemory() in Unity

I'm trying to calculate the memory usage of different parts of my game without using a Profiler. I have several textures loaded, and I get their memory consumption like this: ...
0
votes
1answer
62 views

Unity 3d shooter tutorial animation

I'm following this tutorial. I cannot get even simple animations to work. Here's a very simple case that was supposed to work but did not: Add an animator component to the 'player' prefab Create an ...
3
votes
1answer
71 views

Rendering a distant star field in Unity using a separate camera for near stars

I'm currently working on a hobby project which is a universe simulator (exclusive to stars) built in unity3D. In order to deal with the raw scale of the universe I'm trying to implement two ...
1
vote
4answers
83 views

Get perpendicular vector from another vector

I should clarify that I understand there is an infinite amount of 'perpendicular' vectors in 3D space. I am creating an electricity effect, and to do this the ability to have any number of ...
1
vote
1answer
42 views

Global variables in a multiplayer environment

I would like to know what's the best approach to solve this problem. In a racing game, i need to create the final result chart. In a single environment i've tought something like: private string [] ...
1
vote
1answer
60 views

Increase speed with each enemy destroyed?

I need some help with coding this idea: "For each Target destroyed, increase the Gunner's speed by (speed variable)". The idea is that the Gunner is automatically moving, and I want it to become more ...
0
votes
1answer
66 views

Top down 2d orthogonal view with 3D elements (Unity)

I've decided to give Unity a go with my project. I want to create a 2d RPG perspective world, but with elements of 3D mixed in. So for instance, I think I might make trees and grass 3D, for this to ...
3
votes
1answer
39 views

How can I Debug.Draw different shapes in unity?

I want draw new shapes in Sence for example I want Debug.DrawSphere can I Debug.DrawCollider? Is possible that I Debug.DrawSphereCast
1
vote
2answers
20 views

How can I get width and height of grouped objects in Unity3D

Is it possible to get height and width of grouped objects like this? I tried boxcollider2d.bounds and renderer.bounds. Each shapes in the group has collider component. Is it possible?
-1
votes
0answers
28 views

Unity3D-C# - Resetting WaitForSeconds() on IEnumerator Coroutine

Mmmmm I dunno if I need to show code for this, ´cause this is more of a general question regarding a resetting of a StartCoroutine, or of the yield WaitForSeconds method. Because when I start the ...
-1
votes
0answers
25 views

How to throw an object Unity3d platform? This 2D

There is a platform revolving around its own axis (it works). We need to make sure that when you change the angle of the object platform rolled (it works), and the sudden change in the direction of ...
0
votes
1answer
58 views

How to “mark” a track/ road?

I'm developing a simple racing game, using Unity. I've created a road simply applying a texture (asphalt) to a terrain . Is it possible (and how to do) to mark that roard with an invisible marker to ...
0
votes
2answers
40 views

Cannot overlay text?

I'm trying to make text have a fixed position in world space and be overlayed in screen space at the same time. I have text in canvas with "Screen Space - Overlay" which covers my text located in ...
0
votes
1answer
47 views

Advice on Story Text-Based Game [closed]

I am currently in preparation on making a game. This game will be looks like Lifeline by 3 Minute Games, which is a story text-based game. My game will have the same concept with it. Where there will ...
0
votes
2answers
36 views

Script no longer working now that it is attached to a child object. Why is this?

So I decided I wanted to make this script part of a separate swap-able weapon so I made a child and put the script there. Before the script worked fine but now it won't work. The script works as ...
0
votes
1answer
21 views

Finer collision detection with multi-path Polygon2DCollider from Tiled2Unity

I'm in the process of incorporating Tiled2Unity prefabs into my code. Their exporter creates a collision object (shown below) that amalgamates the collider of each tile into a single Polygon Collider ...