Unity is a highly cross-platform engine that focuses on easy art pipeline process and uses Mono as its scripting back end.

learn more… | top users | synonyms (1)

0
votes
0answers
41 views

How to pass a custom array of data to a shader

I want to know how to pass an array of data (it will be an encoded map, actually) to the fragment shader so I can query it as an array. AFAIK this is sadly not implemented in unity, so I'm looking ...
1
vote
1answer
81 views

Is Physics a prerequisite to learn Unity3D

I have got a basic knowledge about the Unity 3D platform but I coding in Unity has not been that easy for me. For the simple reason I can see is, I cannot understand which function to use for what ...
0
votes
1answer
206 views

Using Appendbuffers in unity for terrain generation

Like many others I figured I would try and make the most of the monster processing power of the GPU but I'm having trouble getting the basics in place. CPU code: using UnityEngine; using ...
0
votes
2answers
63 views

A*Pathfinding lose target after spawning from script?

I have been using A*Path finding to enable object tracking. It works fine if I have both objects on the scene at the same time. However, if I were to use a script to spawn the seeking object ...
0
votes
0answers
23 views

touch.phase == TouchPhase.Canceled not worked

i m tired to handle and solve issues related to multitouch. i m use maximume 5 touch simultaneously but when two touches are down on two object and i moved my fingures then that both touches fired ...
2
votes
2answers
89 views

How do I get rid of this coloured border on my sprite?

I'm working on a 2D game in Unity. My triangle sprites display in-game with a line along one of the transparent sides: Larger view here. You might need to zoom somewhat. It's quite obvious on the ...
1
vote
2answers
107 views

Normals in my skinned model are not animated

I have a blender skinned mode with animation. Normals look like they are messed up. This is how it looks in Unity3D before and after animation. As you can see, my model should be lit up just like ...
0
votes
2answers
61 views

Why does the text of my label objects overlap?

I am having a problem with labels in my GUI: I have looked for solutions online but not found something solid enough to fix this problem. Has anyone ever come across this? Here is my GUI function. ...
-1
votes
2answers
98 views

How to stop a object with progress bar so it can start instantly in unity [closed]

I have created a gameobject(cube) and written code to move,mean while the processbar get loading.when the processbar is loaded fully then the object should stop moving.Can anybody please help me ...
0
votes
1answer
48 views

Simultaneously translating and rotating sprite in Unity

I have a 2D object (a PNG file I dragged onto the screen) which is a circle I would like to move left and right when the correct side of the screen is touched and have it rotate in the respective ...
4
votes
1answer
44 views

Can you change Unity's default script template for a single project?

Can you change Unity's default script template for a single project? Here it's explained how to do that globally and it's fine, I wonder if you can do it on a per-project basis. I mean, I'd bet you ...
1
vote
0answers
68 views

Send Message: Object Not Found

I am trying to call a method within a Unity app from an Android activity by using UnityPlayer.UnitySendMessage. I am getting the error "SendMessage: (ObjectName) not found!". I've confirmed the ...
1
vote
1answer
55 views

Loading source controlled MonoDevelop project leaves out some folders

I have recently started using version control in MonoDevelop and have discovered that if I include a folder containing for example Scenes that they will be included when I push changes to master. My ...
0
votes
0answers
19 views

Is there a way to make Unity 4.3 Sprite packer keep caching even after restart unity?

It's bother me a lot. It has to pack every time I open unity. It took sometimes until it finish. If I drag new image into project and do not specify any packing tag, it still repack. I know there's a ...
1
vote
1answer
80 views

Detect mouse collision over an object

Suppose there are 4 areas namely A1,A2,A3,A4 and each object is given a number(1,2,3,4). When I drag and drop the object(1) on A1, it should print a message "where the object is being dropped". (no ...
0
votes
1answer
41 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 ...
-1
votes
0answers
39 views

Unity does not detect destroyed instantiated object

So I'm trying to get unity to display a message upon destruction of a prefab that I have spawn into scene. The script I wrote does not work when the prefab is spawned using the script (The while loop ...
0
votes
1answer
41 views

How do I get a SphereCollider's global origin in Unity?

I've been following this tutorial: Understanding Steering Behaviors: Collision Avoidance but I'm having trouble implementing one of the functions correctly in Unity, here's the code: private ...
0
votes
2answers
111 views

Deal Damage to Player

I have to make a simple "avalanche" game to show I know how to use the physics and creating terrain. But I actually wanted to go a little above and beyond and actually give the player health so there ...
0
votes
0answers
28 views

How to replace reference to an object by content ID in binary serialization?

So here is the thing, the project has lots of logical objects, fed by data objects, data comes from serialization of yaml assets, containing model properties, like how fast a troll walks and such, ...
2
votes
1answer
123 views

How do I save a screenshot and load it as a texture for use in game?

I have a Unity level that takes a screenshot taken in the previous level and applies it as a material to a Plane, the problem is that it will get stuck and not apply the most recent version of the ...
0
votes
2answers
98 views

Instantiate prefab randomly but not in already occupied position

I want to generate bubbles randomly on screen. When a bubble is generated in one place then other bubbles should not be generated near its radius 1 area, so they can not collide or trigger with any ...
-1
votes
1answer
55 views

If object is bellow another object… do something [closed]

I have 2 objects in scene. When pillar is bellow target, pillar object needs to animate. I get this error: "NullReferenceException: Object reference not set to an instance of an object". var pillar : ...
1
vote
1answer
164 views

Camera movement and threshold not working

I have a platformer that is in progress, part of this has a camera which I only want to move when the character moves out of a certain threshold, to try to accomplish this I have the following if ...
11
votes
1answer
812 views

Does `yield return false;` have special meaning in Unity3d C# scripts?

In Unity, we have some special things for coroutines that are additional to normal C#. for example, we can use yield return WaitForSeconds(5.f); to have a coroutine wait 5 seconds before ...
1
vote
1answer
223 views

A few questions about integrating AudioKinetic Wwise and Unity

I'm new to Wwise and to using it with Unity, and though I have gotten the integration to work, I'm still dealing with some loose ends and have a few questions: (I'm on Unity 4.3 as of now but I think ...
0
votes
1answer
59 views

How do I detect a destroyed object in Unity?

I have an object in unity which is spawn through a script. Upon detecting that the object has taken substantial damage, objectDestroy is called and the object is removed. However, I would like for a ...
1
vote
1answer
88 views

Consistent Space Gravity Simulation

I have done some reading into this subject but haven't been able to come to a conclusion that I'm really satisfied with so far, so here is the situation. I have a game set in space, its top down and ...
0
votes
2answers
109 views

Health bar in unity

I have created a button as my health bar and it must decreasing after a specified time.Here is the code I have written.But the problem,this code is working in the form "Its decreasing the button ...
0
votes
1answer
80 views

Surface creation algorithm using points cloud

I am looking for a realtime algorithm to create a 2D mesh using points. But I am quite confused. It seems that Delaunay triangulation can help me create mesh using point clouds, but Meta-balls seems ...
0
votes
3answers
146 views

Ensuring that a randomly generated galaxy wont place stars inside one another?

I'm attempting to build a game with a spiral galaxy design. In doing so I followed a short guide on making the rough layout of the galaxy. My code works, but the "stars" (I'm bad with variable names, ...
0
votes
1answer
67 views

How to enable/ disable GameObject

I have child object with ParticleSystem component. I want to have particles disabled until I press button. I unchecked child object to make it disabled but when I press play it enables ...
0
votes
1answer
31 views

Unity display message upon keypress?

Hi I'm trying to get NGUI's HUDtext to display a set of text message one of which being "Try using WASD to move" and displaying "Well done!" upon input of any of the four keys. Unfortunately I'm not ...
0
votes
0answers
823 views

Dragging an object by touching on Android

I am trying to move and object by touching it and dragging. I am testing it on my Samsung Galaxy SIII. I have used the following code. For some reason it moves faster than my finger. It should always ...
0
votes
1answer
72 views

How should I texture in Blender to use in Unity?

I need to model some things to use in Unity. How should I texture objects(etc road,tree) in Blender? Almost textures lost when I export them to Unity..
2
votes
1answer
54 views

How can I trigger an event each time the rotation of my rigidbody2D is at a given value?

I would like to trigger an event each time my rigidbody2D is at a particular value. The event should only be triggered once for each given value per complete object revolution. Initial attempts at ...
5
votes
3answers
808 views

How do I access the “product name” in Unity 4?

I would like to access my app name in a Unity C# script; I've found PlayerSettings.productName, however it requires UnityEditor, which is only available in the editor. So, in a normal application, ...
0
votes
1answer
117 views

Gamemaker vs Unity2d - Speed of Development [closed]

I know coding, so programming is not a problem Money is not a problem at all, I can get both GameMaker Master Collection and Unity Pro I want to make a 2d game. So which one is better for speed of ...
4
votes
3answers
4k views

Flick Gesture in Unity3D Android

I'm trying to create a football game where the user will make a flick gesture in order to kick the ball. I'm quite new to developing games in unity3d, I have successfully made a moving ball, added ...
0
votes
1answer
129 views

Angled topdown perspective camera for 2.5d game

I have a 2d tile based game created using Unity's 2d tools and orthographic camera: The tiles are created by programmatically generating a mesh, assigning a texture to each pair of triangles, and ...
0
votes
1answer
527 views

Stop animation playing automatically

I've created an animation to animate a swinging mace. To do this I select the mace object in the scene pane, open the animation pane, and key it at a certain position at 0:00. I'm prompted to save ...
2
votes
1answer
143 views

Can the Shuriken particle system create particles with random shapes and sizes?

I want to create differently sized (but small, relative to the characters) dust clouds for player movement that move away from the player and fade away by shrinking. This animated GIF from Samurai ...
0
votes
1answer
56 views

How to inplement a save-system for a complex nested list of character classs?

This is the situation I'm in: I'm developing a game with C# using unity. In the game I have characters which is either locked or unlocked, and they're pretty much the same. For every character, they ...
1
vote
2answers
57 views

Unity3d - Playerprefs not saving

Im trying to make a script to save the player settings like volume and field of view.It used to work before but it suddenly stopped for some reason.This is the script Im using(a part of it actually) : ...
1
vote
4answers
97 views

Check which object was activated first

How do I check which object was activated before the other? Let's say that there's door to open. To open the door you need to press firstly the second button and then the first button...but not the ...
2
votes
4answers
368 views

(unity) move the world or the character

I'm making a game like this: https://www.youtube.com/watch?v=hO7573lphqI wherein a 3D ship is flying around on a 2D plane. From the player's perspective, the ship will stay stationary in the center ...
0
votes
1answer
43 views

How can I determine where to show a nameplate over a character?

I'm working on a naming system that displays the name of enemies above their heads. The problem is that I have some enemies that are larger or smaller than others. So I'm trying to use a function ...
4
votes
1answer
156 views

Embed Unity3D and load multiple games from a single app

Is is possible to export an entire unity3d project/game as an AssetBundle and load it on iOS/Android/Windows on an app that doesn't know anything about such game beforehand? What I have in mind is ...
0
votes
0answers
20 views

How to create a board with evenly spaced pieces in unity? [duplicate]

Creating a board should be easy but I am having a difficult time doing it in unity because of its world coordinates. I need to create a board that will have squares evenly spread out across the ...
1
vote
1answer
56 views

collision in different layer

I have a game object called game object 1 on screen. It holds an image called red . when i drag an image called "animal" on a game object 1 collision happening fine and destroys the "animal" in same ...