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

Is it safe StringToHash() to use in Unity?

I'm currently browsing through the Unity tutorials and saw that they're recommending to use Animator.StringToHash("some string") to created unique ids for animation properties (see here). Since I'm a ...
0
votes
0answers
59 views

How to move the rigidbody at the position of the mouse on release

I'm making a "Can Knockdown" game and I need the rigidbody to move where the player released the mouse(OnMouseUp). Momentarily the Ball moves OnMouseUp because of rigidbody.AddForce(force * ...
3
votes
1answer
115 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 ...
2
votes
2answers
174 views

How can I put a Unity3D game on an Xbox 360 disc?

I've made a simple shooter in Unity that I'd like to play on an Xbox 360. Mass production not required, just a one-off game, completely non-profit. Perhaps burning to a DVD? Is it a relatively simple ...
0
votes
1answer
52 views

Objects disappear when zoomed out in Unity

Ignore the palm trees here. I have some oak-like trees when I'm zoomed in: They disappear when I zoom out: Is this normal? Is this something to do with draw distance? How can I change this so my ...
1
vote
0answers
38 views

unity4.3 rigidbody2d unexpected force behaviour

So guys ive edited the question and here is what my problem is i have a player which has a rigidbody2d attached to it.my player is able to doublejump in the air nicely and stick to walls when ...
0
votes
2answers
141 views

Unity3D : Retry Menu (Scene Management)

I'm making a simple 2D game for Android using the Unity3D game engine. I created all the levels and everything but I'm stuck at making the game over/retry menu. So far I've been using new scenes as a ...
1
vote
0answers
49 views

Global variables with fixed shaders

In Unity3D, can I use global shader uniform variables with fixed function shaders?
1
vote
0answers
44 views

Unity3d web player fails to load textures

I'm having a problem with Unity3d Web Player. I have developed a project and succesfully deployed it in a web app. It works with absolutely no problem on my PC. This app is to be installed on two ...
4
votes
2answers
567 views

How to ignore collision between two objects

I have a player that shoots in the direction that it is facing. However, the shot that is created when I click, also destroys the player (example). How would I make the shot ignore collision with the ...
15
votes
3answers
2k views

Will Unity skills be transferable?

I'm currently learning Unity and working my way through a video game maths primer text book. My goal is to create a racing game for WebGL (using Three.js and maybe Physic.js). I'm well aware that ...
0
votes
2answers
140 views

Why does my terrain turn white when I get close to it?

When I zoom in on my terrain it goes white: The further in I zoom, the greater the whiteness becomes. Is this normal? Is this to speed up rendering or something? Can I turn it off? I'm also getting ...
0
votes
1answer
118 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
1answer
215 views

Unity 4.5 Sprite Packer does not pack images inside Resources folder

I'm trying to use the new Sprite Packer tool, but it doesn't work if I put the imagens inside Resouces folder, but inside any other folder it works. is it a bug?
0
votes
1answer
89 views

Download and open an zip file ingame on unity for android

I would like to know if it is possible to have a game that would download a rar or zip file from a website and extract it to the internal storage for use, and if it is a good option since i have to ...
4
votes
1answer
223 views

Unity falling body pendulum behaviour

I wonder if someone could provide some guidance. Im attempting to create a pendulum like behaviour in 2D space in Unity without using a hinge joint. Essentially I want to affect a falling body to ...
5
votes
0answers
90 views

No idea of how to simulate car crashes [closed]

I have a simple car game with all the basic collision detection and movement in Unity with C#. But when I was building the "engine" for the game I didn't include a detail I later decided to include. I ...
2
votes
2answers
206 views

How do I get mouse x / y of the world plane in Unity?

I am trying to make a tiled landscape. The terrain itself is not made from tiles but the world has a grid which I define. I would like to place boxes/rectangles which snap to this grid, at runtime, ...
0
votes
1answer
208 views

Can I use clipping with Unity Sprite in NGUI?

I used NGUI free version (2.7) with Unity 4.3. I have tried to use clipping to restrict the area of viewer by using clipping to hide some content of Unity Sprite. However, it did not work. If it's ...
3
votes
3answers
106 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 ...
6
votes
3answers
668 views

Create a trailing, ghosting effect of a sprite

I want to create a trailing, ghosting like effect of a sprite that's moving fast. Something very similar to this image of Sonic (apologies of bad quality, it's the only example I could find of the ...
1
vote
1answer
153 views

Displaying streaming video on dynamic texture

We are working in Unity 3D on pro licence and we are faced with the task to display streaming video as a dynamic texture in out Unity3D web project. We have a standard IP-camera , which is capable of ...
0
votes
1answer
57 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); ...
1
vote
1answer
180 views

Adding an existing script to a gameobject programmatically

Is there a way to take a script and apply that specific script to an object through code? In pseudocode, what I'm trying to do is essentially as follows: ObjectOne.MyScript = ...
4
votes
3answers
219 views

Why does Unity in 2d mode employ scaling and the default othographic size the way it does?

I previously used SFML, XNA, Monogame, etc to create 2d games, where if I display a 100px sprite on the screen, it will take up 100px. If I use 128px tiles to create a background, the first tile will ...
-1
votes
4answers
175 views

How to increase the game “level” after certain amount of objects spawned?

The game is supposed to increase the level by 1 every 10 spawns of an object, using totalShots % 10 == 0. So, when totalShots is equal to 10, 20, 30, etc. the level should increase by 1, however, the ...
0
votes
1answer
154 views

How to randomly spawn object using instantiate

I'm trying to spawn objects which move in one direction until they hit a player or the barrier. The spawner is a cube which moves between two points to spawn the object at different locations. The ...
0
votes
1answer
181 views

Going from WPF to Unity3D, how to implement the MVVM-pattern?

I've been working with MVVM in WPF for a long time and I'm now trying out Unity3D for a GUI-driven application. Can I work with view models and bind them to properties in GUI-components? I guess the ...
1
vote
2answers
124 views

Object goes straight through game object without colliding

The "shot" is supposed to collide with the left bumper and then be destroyed, but the shot goes right through it. Both objects have a box collider. The following is the code I am using: #pragma ...
0
votes
1answer
56 views

Can I have a fixed-angle sprite with a non-fixed-angle CircleCollider2D?

In Unity2D, can I have a fixed-angle sprite with a non-fixed-angle CircleCollider2D? I would like to move my character using the circle physics (without fixed-angle), but display him always as if he ...
0
votes
1answer
208 views

How do I efficiently display image tiles in Unity 4.3 free

I previously wrote a TileEngine with SFML that I would like to port to Unity3D 4.3, but have not found a way to draw a tile on the screen programmatically in Unity. All I am looking for something ...
0
votes
0answers
61 views

Swiping with rigidbody

My character moves continuously forward with rigidbody.velocity = v3Force * strength; My Swipe script is based on a youtube tutorial from https://www.youtube.com/watch?v=9ZIHx09GevI I just changed ...
1
vote
3answers
154 views

How to manage variables and/or data?

Let's say I have a class A with many constants (over 20) and variables (also around 20). Class B represents a character so it has a lot of constants and variables representing various stats. Class C ...
2
votes
1answer
121 views

How can I create or extrude a mesh along a spline?

Let's say, for example, that I have a working spline. I want to use this spline to create a mesh, but I'm not quite sure how to go about it. For example, I want to create a road along this spline. I ...
0
votes
1answer
112 views

Background Sprite Setting

For my 2d game, I want to set background image. So that I am using multiple background images for that purpose. But it can't set correctly on screen that illustrated in following image. Also for ...
0
votes
2answers
153 views

Stormy water like Temple Run 2 for Mobile

How can I make stormy water like they did in Temple Run 2. I've tried with Unity Water Pro to achieve the same result but when I include it in the project the frame rate crashes to 3 frames per ...
0
votes
0answers
78 views

How to implement 2D Ai Wandering with 8 - directional movement using Perspective Images in unity 4.3?

My requirement is to move a 2D characters with perspective view images has to wander in game area by choosing dynamic path and according to that the AI character has to switch the animations based on ...
0
votes
1answer
89 views

Free Look Camera Like Arma 2 while pressing ALT [closed]

I'm trying to create a simple script that give me the possibility to rotate the camera while pressing a key. So, in a pseudo-code way, how I can intercept the Input event and limit the player's ...
0
votes
1answer
72 views

'Dynamic' textures?

I am creating a 3D game in Unity. The main game mechanic involves a large open world area. In various places throughout this world are billboards and other devices that would show 'adverts' etc in the ...
2
votes
0answers
63 views

Unity3D — WAV plays an octave too low on Android

I have generated a synthetic 'concert pitch A' tone from sinewaves. It plays properly on OS X player, and on my Android device. Now I record myself singing a 'concert pitch A' into the microphone as ...
0
votes
0answers
74 views

Realistic collisions with a kinematic rigidbody?

I have a car game where player drives a car; this car has a collider and a kinematic rigidbody attached and is completely controller by script (i.e. a script sets its position and rotation). In the ...
2
votes
1answer
154 views

How can I manually draw a Sprite in Unity?

I'm creating a simple workaround on the unsupported prefab-on-prefab. I've thus created this simple class: [ExecuteInEditMode] public class PrefabLinker : MonoBehaviour { public GameObject ...
1
vote
2answers
89 views

Unity - Across the wall

I have a problem here. I animated my main character and is working. It walks run and jump however it goes across walls and ground. As in every single video I watch in unity tutorials I put a ...
6
votes
1answer
221 views

How do I make a slot car game?

I new to game development with Unity and my first project is a slot car racer. For a realistic slot car-like-driving experience, I first build a track with a channel in the track and a pin on the car. ...
1
vote
1answer
288 views

Unity Move sprite from point A to point B

Pretty new to Unity and i'm trying to make a very simple iphone game. , I'd like to know how to move a sprite (2D) move from random point A to random Point B not just that, but i want it to change ...
1
vote
1answer
68 views

Different OnMouseDown functions based on where an object is clicked

So my problem is I'd like to have one GameObject with multiple "OnMouseDown" functions. I have a target (classic looking bullseye) and I'd like to award a player say 10 points if they click on it, but ...
1
vote
2answers
102 views

Android Activity access Unity Classes

I have made my own C# classes in Unity, is there any way I can access these classes from the Android Activity that starts the UnityPlayer? Example: I have a C# class called testClass in Unity: class ...
3
votes
4answers
95 views

How can I avoid updating my Unity projects when I have two versions installed?

I currently have two versions of Unity on my Windows computer. I would like to not update my projects to avoid compatibility issues like I had in the past. Installation in another folder goes just ...
5
votes
4answers
455 views

Does Unity let you code in Java?

I am fairly new to Unity3D experience , but I have a very good knowledge of Java and Android development. I am really confused that if Java is at all needed for developing android applications? I read ...
2
votes
2answers
93 views

Do I have to use new keyword for unity single game object?

I'm using Unity4. Do I have to use new keyword for single game object? look at the following code. 1. GameObject obj = new GameObject(); obj = Resources.Load("Prefabs/Ball", typeof(GameObject)) as ...