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 (2)

0
votes
0answers
21 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 agent....
0
votes
3answers
57 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
84 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
27 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 = SketchTerrain....
0
votes
2answers
37 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") { ...
1
vote
3answers
63 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
16 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
33 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
20 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
22 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
27 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
31 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
81 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
72 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
27 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
93 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
104 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
57 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
77 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
34 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: Profiler....
0
votes
1answer
73 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
75 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 co-...
1
vote
4answers
99 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
46 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
63 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
110 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
45 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
22 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?
0
votes
1answer
61 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
45 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
57 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
38 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
27 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 ...
0
votes
3answers
43 views

Unity inspector script - making it save the global variables for what it's creating

I have a script which initialises a bunch of child gameObject(s). I wanted all of this to happen outside of the game, so I created an inspector script which has a button which triggers the method ...
4
votes
0answers
39 views

Why Can't I duck reverb on the mix bus in Unity?

i'm surprised there is so little documentation on this issue. But i'm trying to duck the audio on all the mix buses in Unity so that you can clearly hear the VO of the game. Now it works great except ...
0
votes
1answer
57 views

How to efficiently move in Unity2D? [duplicate]

If i want to use Physics in Unity2D what should be the most efficient way to move the object without interfering physics? 1. Transform.position 2. Rigidbody.Velocity 3. Rigidbody.addForce 4. ...
4
votes
2answers
250 views

How do I change the mesh in an existing prefab in Unity?

So I made a prefab some time ago and now I want to change the mesh without changing any scripts. I have an OBJ file I want to use. Is there any way to do this? I've read the documentation but I don't ...
3
votes
0answers
59 views

Oculus Rift on Motion Simulator Platform

I currently develop a VR environment for an existing (physically) large motion simulator platform. The user can sit on this motion platform and gets accelerated and tilted to induce the feeling of ...
3
votes
1answer
86 views

Player motion and combo systems

Where do you usually implement player motion when going through the state machine of a combo system? An example, when player presses X+Y it must do an uppercut like movement (Like street fighter) ...
0
votes
2answers
62 views

How to make the wheels rotate depending on the speed of the vehicle

I want to know what the right formula is, or a way to make the wheels rotate with the speed of the vehicle? What is the standard way to make wheels look realistic and natural? Do developers use other ...
1
vote
0answers
27 views

Unity WebGL responsive

I am trying to embed Unity WebGL to a web page. I wonder, is it possible to make this responsive, so it will always fit whatever the screen size? How to do that? Thank you for answering.
0
votes
0answers
34 views

Why does my player gameobject jump up at an accelerated speed when I move forward or backwards?

I've been working on my own custom character controller for a little while now, and almost everything has been working fine, except for jumping. Whenever I move forwards or backwards while jumping, ...
0
votes
0answers
24 views

Low intensity of projector in dark enviornments

I am using light Projector as Headlight for player bike....The thing happening is the intensity of projector reduces in dark environment whereas in normal sunny day projector brightness is proper ,. ...
3
votes
1answer
102 views

Why create meshes instead of using Planes?

I'm working on a top down 2D game in Unity and I want to create levels dynamically. All tutorials I find tend to talk about generating meshes so I've followed some great tutorials such as this one. ...
0
votes
0answers
12 views

Is it possible to not include or erase AABB data from a procedurally generated mesh with Renderer?

I am procedurally generating many thousands of very simple meshes with very simple texture (the same for all meshes and instances) in Unity (5.3.4) with C#. Currently they take more than 100MB in ...
0
votes
2answers
54 views

Object shrinks at same rate no matter what

I am using the following code to shrink a sprite: public bool shrinking = false; public float targetScale = 0.1f; public float shrinkSpeed = 0.1f; void Update () { if(shrinking) { ...
1
vote
3answers
71 views

Managing data for large number of levels in Unity?

I am making a Unity game vaguely in the vein of Candy Crush Saga for a client and am moving in circles trying to decide how to manage the data for all of their levels. In brief, they want to divide ...
0
votes
2answers
57 views

Plugins for creating and styling custom Editor Windows like C#/C++ Form Designer or “Web Inspector”?

Unity3d allows to construct window with custom UI. Just need to use EditorGUI/EditorGUILayout classes and their static methods. Example of custom window: The problem is that all the components have ...
0
votes
1answer
41 views

How to “properly” display a 2d sprites in a 3d environment?

I would like to show "the classic" missile lock viewfinder (the target symbol) of a war aircraft. So the target symbol must follow the enemy, and became red when "lock" it. So i thought simply to ...