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
12 views

Monobehaviour can not find a member OfType in Unity

This is the line where I am getting above mentioned error: var listeners = FindObjectOfType<MonoBehaviour> ().OfType<iPlayerRespawnListener> (); I have already imported these libraries ...
3
votes
3answers
124 views

How to launch a prefab at the mouse position

I want to use Instantiate(item, new Vector3(...), Quaternion.identity) to land an item at the position that was clicked. My game is using a third-person view (example). This is the code that I think ...
1
vote
3answers
134 views

How to create sprites, programatically without using prefabs?

I have different types of images for different sprites. and i am not certain that how much different sprites(images) i will have to show. So, i gotta create the sprites and apply textures ...
-2
votes
1answer
22 views

animation problem on player movement ( unity ) [on hold]

I atached these script to the player . And added animations. And it moving perfectly, but the problem is when i click play, it playing the moveP animation automatically. How can i make it. If i ...
2
votes
3answers
2k views

What needs to be done to port a Windows Flash game to Android?

My team has developed a game using Flash (with Lua embeded) that targets Windows. And we want to port that game to Android (also iOS in the future). It's acceptable to rewrite the Flash part of ...
-3
votes
0answers
25 views

Unity 3D UI freeze [on hold]

I have a last version of Unity 3D. And I have a problem with it. When I do something UI is freeze, so I can't see result of my actions, but when I resize window all is fine. So when I select texture ...
1
vote
0answers
27 views

How to make a text of several letters animate, only with an animation

I wonder if it is possible to create an animation in a text with a single "animation". The problem is that for me to reach the desired effect I need to create an animation for each letter, as each one ...
-1
votes
1answer
117 views

Disabling / Enabling object renderers on click

I am working on unity2d. I have six game objects: Object1, Object2, Object3 (these are images) ObjectImage1, ObjectImage2, ObjectImage3 (these are images). I have arranged the object in the scene ...
1
vote
0answers
97 views

How to keep two objects in the same zone when they collide?

I made a zone out of a cylinder with zero height. When one sphere moves to that zone it is fine but if another one moves to the same zone it only shows one sphere. I tried to add a rigid body for ...
0
votes
1answer
90 views

Game object position issue in unity3d

I have a set of objects placed on the same layer where all the objects are invisible except one .When i drag an object in to a selected area the current dragged object get destroyed and the object ...
0
votes
2answers
159 views

Is it possible to use C++ with Unity instead of C#?

The title kind of says it all. Is it possible to replace C# with C++ on a game using Unity?
-1
votes
0answers
61 views

Randomly generated voxel planets? [on hold]

what would be best way to implement this in unity engine, I have code that can render three dimensional array of bytes as voxels and it can generate good looking flat terrain using perlin noise, but I ...
2
votes
2answers
343 views

Intelligently move aircraft using curves

I am trying to code a script to move an aircraft entity from point A to point B and at some point in the middle of moving have the aircraft forward vector face Point C (to fire a missile at an enemy ...
0
votes
1answer
103 views

VertexColor shader is not working correctly in built application

I want to change the vertex colors of my mesh. The light sources must not affect the objects with this shader, its lighting must be determined only by its vertices colors, so I turned the Lighting ...
0
votes
2answers
89 views

Set new forward directions based on camera position

I have a 3rd person camera which can rotate around the player. When I look at the back of the player and press forward, player goes forward. Then I rotate 360 around the player and "forward ...
0
votes
1answer
174 views

Change players state and controls in-game

I'm using Unity 3D Let's say the player is an ice cube. You control it like a normal player. On press of a button, ice transforms (with animation) into water. You control it completely different than ...
1
vote
0answers
34 views

Unity Animator State Freezing

I am really new with Unity, I am making a game, but I am having some problems with the animators, my problem is that I am trying to add some animations to my menu, and also add new characters to my ...
13
votes
3answers
7k views

Can I legally remove the default Unity splash screen by removing it from the APK?

While using Unity I export an Android game as an APK. When the APK is run, the first thing that is displayed is the Unity splash screen. I worked out that I could replaced that image by opening the ...
0
votes
0answers
29 views

Text within a gameObject boundries

I am working in a little project and I want to show text within a rectangle. for that I use a sprite(rectangle) and a child that contains a TextMesh as component. The text change during runtime, and ...
-1
votes
2answers
89 views

Does Unity have a built in pathfinding system?

I know that there a lot of plugins available for pathfinding in unity but I was just wondering if unity has a built in pathfinding system ?
0
votes
1answer
50 views

Animation position changes everytime I play the animation

I've been trying to create a death animation for an enemy object in my scene.I created an animation on an empty object in which i placed all my child objects like hands and legs.I animated them but ...
1
vote
2answers
307 views

How do you map a texture to a sphere in Unity using script?

I am looking to map a texture to a sphere inside of Unity using c# (not in the visual editor)? dragging a jpg or other image resource onto the sphere is the effect I am looking for -- but I would ...
0
votes
1answer
98 views

What is the best type of c# timer to use with a Unity game that uses many timers simultaneously?

I am developing a stand-alone 3d game in Unity that will have anywhere from 1 to 200 timers running simultaneously. There will be a GameObject containing 1 timer. For this game timer durations will ...
0
votes
2answers
53 views

Unity, Unrealistic Sphere On Inclined Plane

So I am trying to model a ball rolling down an inclined surface in Unity based on what I am observing in real life but it is still quite off. In Unity it takes the ball about 3 seconds to travel ...
-2
votes
1answer
706 views

How to obtain a camera stream from Unity without rendering it to the player's screen?

I'd like to stream the output of two cameras to a separate process. Right now, it looks like the best way to do that is to grab the rendered camera views from the screen via platform specific screen ...
0
votes
1answer
436 views

Creating a curved mesh on inside of sphere based on texture image coordinates

In Blender, I have created a sphere with a panoramic texture on the inside. I have also manually created a plane mesh (curved to match the size of the sphere) that sits on the inside wall where I can ...
5
votes
1answer
2k views

Unity: how to apply programmatical changes to the Terrain SplatPrototype?

I have a script to which I add a Terrain object (I drag and drop the terrain in the public Terrain field). The Terrain is already setup in Unity to have 2 PaintTextures: 1 is a Square (set up with a ...
2
votes
2answers
294 views

Keypress Left is called twice in Update when key is pressed only once

I have a piece of code that is changing the position of player when left key is pressed. It is inside of Update() function. I know, Update is called multiple times, but since I have an ifstatement to ...
0
votes
1answer
191 views

Make Gameobject Stand On Surface Facing Certain Direction

I want to make a biped character stand on any surface I click on. Surfaces have up vectors of any of positive or negative X,Y,Z. So imagine a cube with each face being a gameobject whose up vector ...
1
vote
0answers
82 views

How to implement efficient Fog of War?

I've asked a question how to implement Fog Of War(FOW) with shaders. Well I've got this working. I use the vertex color to identify the alpha of a single vertex. I guess the most of you know what the ...
0
votes
0answers
11 views

How do I check user's unlocked achievement and leaderboard scores via GPG plugin

I need to load user's achievement and their scores from leaderboard in my game. But the Social.LoadScore() and Social.LoadAchievements() both returns a 0 size array in callback. When I checked the ...
1
vote
0answers
38 views

How can I dynamically load the correct sprite from a sprite sheet?

I am making a simple card game in unity. The game is based on a standard 52-card pack, with identical backs for unique faces. In my particular game different cards are worth different values and have ...
0
votes
1answer
81 views

Unity-Animation parameters are not being set

I have the following animation controller: with two parameters of walkingSpeed and Jump. I have the following code which should change the values: animator.SetFloat("walkingSpeed",0.9f); ...
0
votes
0answers
24 views

Ouya build experiencing odd graphical artifacts, screen half black

I'm witnessing very odd graphical artifacts when I run my Unity game on Ouya. After the Unity splash screen, the game loads with the screen half black. This seemingly has started occurring out of ...
1
vote
0answers
42 views

Having a hard time having consecutive animations for an attack [on hold]

So I've been trying to figure this out for about 8 hours now...It's driving me nuts because I am pretty sure that it is something dead simple that I am just not understanding. I had everything working ...
0
votes
1answer
237 views

How do I add a Rigid body and a box collider component to a Texture2D?

I am making a snake game. I'm basing it on a basic tutorial game, which does no collision detection, wall checking or different levels. All snake head, piece, food, even the background is made of ...
2
votes
2answers
126 views

How to implement Fog Of War with an shader?

Okay, I'm creating a RTS game and want to implement an AgeOfEmpires-like Fog Of War(FOW). That means a tile(or pixel) can be: 0% transparent (unexplored) 50% transparent black (explored but not in ...
-1
votes
1answer
143 views

Lock mouse in center of screen, and still use to move camera Unity

I am making a program from 1st person point of view. I would like the camera to be moved using the mouse, preferably using simple code, like from XNA var center = this.Window.ClientBounds; ...
13
votes
3answers
3k views

How to avoid movement speed stacking when multiple keys are pressed?

I've started a new game which requires no mouse, thus leaving the movement up to the keyboard. I have tried to incorporate 8 directions; up, left, right, up-right and so on. However when I press more ...
1
vote
1answer
67 views

How to make an object move again after being stopped by collision in Unity?

I have a player object which position is always centered on the main camera's viewport. This object has a Rigidbody 2D, a box and circle collider. The player moves around a level, the level has a ...
-2
votes
0answers
21 views

What tech/assets for 2D in unity [closed]

I'd like to make a 2d game thats heavy on HUD and grid base. The art would be pixel art and I'd like it to be pixel perfect if possible What tech do I use in unity for 2D? I prefer free or free to ...
0
votes
1answer
67 views

Why do camera's aspect ratio look good on computer but not on Android devices?

I'm developing a game for Android devices and I have a script that solves the aspect-ratio problem for computer screens but not for my intended target platform. It looks perfect on computer, even when ...
-1
votes
0answers
41 views

Algorithm to shift the car [on hold]

I have a track that can be divided into n number of tracks and a car as GamObject. The track has transforms such that some part of the track's width lies in negative x axis and other in positive. ...
-2
votes
0answers
31 views

2D Pixel/sprite game in unity? [closed]

Hi I'm an absolute newbie in unity. In the past I was told unity is terrible for 2d games so I look away after looking at it for a few days. I don't remember if this was right before unity4 came out ...
0
votes
1answer
84 views

Move a sphere along the swipe?

I am trying to get a sphere curl based on the swipe. I know this has been asked many times, but still it's yearning to be answered. I have managed to add force on the direction of the swipe and it ...
0
votes
0answers
25 views

Scrolling background with changing textures

I have the 2 cubic structures that are my tracks and are scrolling basically to give effect of movement on object. In my OnBecameInvisible() method, I have changed their Tiling using mainTextureScale ...
0
votes
2answers
21 views

Material tiling and offset in unity

Ambiguity: What exactly is the difference between Tiling the material and Offset of material? Need to do: I need the material to be repeated n times on the object where I need to set the value of n ...
0
votes
0answers
22 views

Can Layer Masks Achieve This Effect

If you look at the image below you will see the player surrounded by a dotted yellow box. The dotted yellow box is also part of the player and represented a portion of the player being masked from ...
0
votes
1answer
101 views

Simple heart container script for 2D game (Unity)?

I'm attempting to create a simple mobile game (C#) that involves a simple three-heart life system. After searching for hours online, many of the solutions use OnGUI (which is apparently horrible for ...
0
votes
0answers
28 views

Assigning an item to an existing array in a list within a dictionary [closed]

I have a Dictionary declared like: public var PoolDict : Dictionary.<String, List.<GameObject[]> >; I made a function to add items to the list and array function Add(key:String, ...