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
2answers
75 views

Load Prefab to variable

I have my code, for my weapon: using UnityEngine; using System.Collections; public class Arma : MonoBehaviour { public static int municao; GameObject bullet; GUIText texto; // Use ...
-1
votes
2answers
74 views

C#Script select GameObject

I want to load the prefab instead of the gameobject that is in the screen, my code is this one: using UnityEngine; using System.Collections; public class Arma : MonoBehaviour { public static int ...
0
votes
0answers
30 views

moving a rig's hips by his leg bones

i am using motion capture with sensors attached to my legs. I can move my legs and rotate them at present. Now i want to add gravity to it and make the rig walk on a plane. I used basic collision by ...
0
votes
0answers
44 views

Unity3D : Prefab Instancing Issue

I am using latest unity engine and I am having a scripting issue. I create a prefab , added a few scripts to it and I am trying to instantiate a few of those objects like this : GameObject ...
0
votes
1answer
70 views

touch in guiTexture

Before time in my game start. i want there will show a guiTexture.. if i touch this guiTexture, that will hidden and the time game will start. I try to make a script but it doesn't work. I'm a bit ...
0
votes
0answers
50 views

Unity - Android touch Problem

I've build my game for various platforms using Unity3d 4.3.3. I've tested it on windows, Mac, iOS and android as well. It works perfectly in all the devices except few high and android devices like ...
0
votes
1answer
107 views

Projective texturing and falloff

I quite understand how projective texturing works. I implemented successfully a shader for that following nvidia doc. The major problem I'm facing is that with that implementation the projector ...
0
votes
1answer
116 views

Take a screenshot from camera problem

I use script below to take a screenshot from camera. It's working fine. However, when I take a screenshot again (pressing k multiple times), its old image is not clear from the memory and it keep ...
-2
votes
1answer
107 views

Is Unity a well suited engine for games with procedually generated environments? [closed]

I've been looking for a suitable game engine for a new project, which will rely heavily on procedurally generated 3d environments. I've been looking into Unity, but it's not clear to me at this stage ...
2
votes
1answer
140 views

Inverse Explosion with Unity2d

I am currently trying to make all other objects push away from the player when the player explodes. It currently works, but it pushes close objects a little and far objects very far. What I want is ...
0
votes
1answer
34 views

GtkRadiant to unity?

i just chose unity as my game engine an i don't like the level editor, and i really enjoy gtkradiant, its really easy and fun to use. I was wondering if someone knows a way i can use my gtkradiant ...
1
vote
1answer
54 views

Determine Mesh Vertex Index Given Another Mesh Index

Please bare with me as I explain what I am trying to accomplish :P Each 'X' below represents a mesh vertex: For my Unity3d GameObject (G1); the mesh vertices are stored in a C# List object in the ...
0
votes
1answer
119 views

How do I create a HUD that appears to occupy 3D space/can animate?

I'm working with a group to try and make a first person space platformer in Unity, and was wondering if there would be anyway to create a HUD that moves and reacts to player actions, specifically ...
0
votes
1answer
190 views

What affects the size of APK files?

The size of the .apk file built by Unity is larger than I expected. Is it image resolution, number of scenes, or something else?
0
votes
0answers
61 views

hide and show many guiTexture

in the 1 scene there are many guiTexture. So how to write this code ? public class guiTanya : MonoBehaviour { public GUITexture guiA, guiB, guiC, guiD, guiE, guiF; void onMouseDown() { //if i press ...
0
votes
2answers
167 views

Problem with moving player through a secript by a set distance

I am currently trying to add a sort of "dash"-ability to my sidescroller. What I try to do, is to let the player press a key where a simple key-press causes the player to move quickly into one ...
0
votes
1answer
205 views

How to design enemies pattern in non-bullet-hell shmups in Unity? [closed]

I am making a top down shooter. Enemies will come in waves and attack in many different patterns (i.e. wave of 10 enemies flying in a elliptic curves, or a huge boss floating and shooting at you, ...
4
votes
1answer
195 views

How are game menus logically structured?

I've been struggling with making a game menu system in Unity for some time now. I spent time developing a way to help myself understand how game menus are connected together. Right now, I'm calling it ...
0
votes
0answers
51 views

How do I dynamically load a smaller texture in Unity based on the screen size?

I have a Unity application on windows phone which is having problems running on small devices because the HD textures are so huge. What is the best way to test and dynamically use a smaller version on ...
0
votes
1answer
185 views

Unity Gui from text file templates

I've been banging my head against a wall this past while over how I might create menu's and menu components in unity from text file. I would normally just build my own extended panel/label classes etc ...
0
votes
2answers
145 views

Unity - Avoid using Find method by caching UnityObjects - Code review

I'm trying to avoid using GameObject.Find during runtime to find particular GameObject components when wanting to instantiate them. I have created a cache for the gameobjects from which I can either ...
1
vote
1answer
130 views

Why Does unity_LightPosition[0] Seem to Depend on Camera Position?

I'm trying to write a fairly basic shader but I keep running into lighting issues with Unity. My first problem was trying to figure out which variable stored the light's position in world space. ...
4
votes
2answers
170 views

How can I find the “end” vertices on an open-ended mesh?

I was looking at a video of a system that extrudes meshes along a curve, connecting them end to end but adjusting the vertices for a smooth connection. It does this with a mesh that as far as I know ...
2
votes
2answers
132 views

Unity: how highlight effect should be applied to terrain mesh

I have my game generate random voxel terrain, and then generate a mesh on only the visible parts of that terrain. I want it to be able to select some part of the terrain with the mouse, but I'm not ...
0
votes
1answer
157 views

Problem with Raycasting in a 2D Game

I'm new to using unity and came across a problem when I was following a tutorial. The game is in two dimensional space, and when my player walks over a certain tile the detection never goes off. ...
3
votes
1answer
254 views

How to compress Unity apk output?

I made a game with Unity but the size of .apk file got so large, it is about 70mb... Is there some way that I can compress my apk file?
0
votes
1answer
157 views

Make GuiText responsive

I'm using C# code to make a responsive GuiText. I was abel to make a responsive GuiTexture, but I'm struggling with doing the same for a GuiText. Code for the responsive GuiTexture using ...
3
votes
2answers
123 views

GameObject once walked on, gives message using C#?

I'm struggling to figure this code out by myself. I'm able to check if the objects are in the scene, and if they are print a message. I now want the GameObject of tag Zone to display a message to let ...
1
vote
1answer
42 views

No animation clips in assets folder

I'm trying to import an FBX file made in Blender into Unity so I can use the actions created in Blender in a Unity animation state machine. A lot of sites seem to suggest that simply dropping the FBX ...
0
votes
2answers
65 views

Using Smaller Textures in Unity on Older/Smaller devices

In Unity, when you have MipMapping selected, will this cause the full size texture to always be brought into memory? I have a game which runs on high end mobile devices with ultra-high resolution ...
-2
votes
1answer
215 views

Unity3D - Clones won't get destroyed by script

I need some help making this script work. #pragma strict function OnMouseDown () { Destroy (gameObject); } Basicly what the script does is that it destroys the objects that the player clicks on.I ...
1
vote
1answer
147 views

Unity: Rolling a ball around a spherical planet with forces

I'm trying to make a game in Unity where the player character is a ball (a sphere), and the game world is a planet (a very large sphere) that the ball can roll around on. The ball can be rolled in any ...
1
vote
2answers
92 views

Effect culling on uneven terrain

I'm trying to integrate a "ground particle" effect (like a fire-circle or similar) in Unity3d, however since i'm using uneven terrain as my terrain mesh, the effect gets culled behind terrain parts ...
0
votes
1answer
75 views

Is it ok to destroy mesh directly from MeshFilter in Unity?

Mesh.Destroy(myGameObject.GetComponent<MeshFilter>()); May it cause any problems or undefined behaviour? (the reason I ask this is that I'm trying to destroy an exiting component which is ...
0
votes
4answers
270 views

Scripts won't affect clones - Unity3d

I made a script which swaps two game objects on click.But the script won't work because the objects are actualy clones of the original prefab. This is the script (UnityScript): #pragma strict var ...
0
votes
1answer
98 views

I want to make a pause button on the scene

I want to make a pause button on the scene. If I press the button it will show the guiTexture with a variety of buttons with each different script. So what steps should I take? 1. How do make it so ...
0
votes
0answers
91 views

Assigning valid moves on board game

I am making a board game in unity 4.3 2d similar to checkers. I have added an empty object to all the points where player can move and added a box collider to each empty object.I attached a click to ...
2
votes
2answers
290 views

Animate from end frame of one animation to end frame of another Unity3d/C#

So I have two legacy FBX animations; Animation A and Animation B. What I'm looking to do is to be able to fade from A to B regardless of the current frame A is on. Using animation.CrossFade() will ...
0
votes
0answers
242 views

using Unity Android In a sub view and add actionbar and style

I exported a simple animation from Unity3D (version 4.5) in android project. With eclipse I modified the manifest and added another activity. In this activity I put a button that it makes start the ...
4
votes
1answer
285 views

Is white the best base color to start with when planning to shade sprites within Unity?

I'm looking into prototyping a game in Unity which will consist of solid square sprites / tiles. I figure I can represent different types of objects with different colors for each of the tiles in the ...
0
votes
1answer
54 views

Unity - Invert Movement Direction

I am currently developing a 2,5D Sidescroller in Unity (just starting to get to know it). Right now I added a turn-script to have my character face the appropriate direction of movement, though ...
1
vote
1answer
221 views

Unity3D - Android pause screen - double click issue [closed]

I made a pause script for the game im developing for android. I added the script to the GUITexture I created and placed on the top right side of the screen.The issue stands at the part where if the ...
2
votes
1answer
127 views

Unable to use Maya animation with scripts when imported to Unity

I am testing to import Maya animation over to Unity. I set up a simple cylinder with 2 bones and an IK handle. Made a simple animation where the cylinder bends and goes back to straight position over ...
0
votes
1answer
362 views

Unity3D : Pause Menu - Android

I am making a 2D game for Android. Almost completed the game but now I need a pause game option. I added a pause icon on the top right side of the screen. The icon is a GUI texture. What I did so far ...
0
votes
1answer
96 views

Repelling a rigidbody in the direction an object is rotating

Working in Unity, I have a game object which I rotate each frame, like so: void Update() { transform.Rotate(new Vector3(0, 1, 0) * speed * Time.deltaTime); } However, I'm running into problems ...
1
vote
1answer
59 views

Textures selectively not applying in Unity

On certain imported objects (fbx) in Unity, upon applying a material, only the base colour of the material is applied, with none of the tiled texture showing. This isn't universal; on a test model ...
5
votes
3answers
561 views

Is Unity's Random seeded automatically?

I seem to recall Unity's Random is automatically seeded; checking the documentation it doesn't say it outright, but a certain interpretation of their words might seem to imply it. The seed is ...
2
votes
1answer
343 views

2D metaball liquid effect - how to feed output of one rendering pass as input to another shader

I'm attempting to make a shader for unity3d web project. I want to implement something like in the great answer by DMGregory in this question. in order to achieve a final look something like this.. ...
2
votes
1answer
112 views

Deslect targeted enemy question. How to change back to original color [closed]

Hello. Apologies in advance but I'm VERY new to unity , C#,coding and Stackexchange in general. I'm working really hard to understand it all! ANY advice would be appreciated. And sorry again if the ...
5
votes
2answers
172 views

Inversion of control in Unity?

I am semi-experienced .NET developer who has just began working with Unity. I am trying to decide on how to make IoC work in Unity 4.X ( I have not yet tested anything), and I wonder what are the good ...