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
1answer
18 views

Sending RPC calls from server to client inside Unity

In my game inside Unity, I have two scenes setup. One for the main server ( acts like authoritative server ) and the other scene for my client. The game starts once my client connects to the server. ...
1
vote
2answers
58 views

How do I create the visual effect of transitioning between night and day?

I am making an open-world project in Unity 4.5.5 and I want to create a visual effect of transitioning from day to night? The Legend of Zelda: Wind Waker HD has a great example of such a transition. ...
0
votes
2answers
37 views

How do I have a camera follow my object in Unity?

I have an object that automatically moves by itself and I want the main camera to automatically follow it.(Like in games such as geometry dash and jetpack joyride) This is the code for the automatic ...
0
votes
0answers
19 views

Passing random number parameter to RPC call inside Unity

So I have posted a similar question previously but this is more specific to actual code that I am trying to implement for a multiplayer game that I am working on for IPAD. In short, this will be a ...
0
votes
0answers
16 views

InvalidCastException: Cannot cast from source type to destination type [on hold]

I have fetched the data from xml and stored it in an array.I have coded as below private var timearray:Array; private var distancearray:Array; private var distancedata : String; private var timedata ...
0
votes
0answers
18 views

Rewriting the existing code for RPC in Unity

So I am basically done making a game inside Unity. The next phase is for me to make the game run on different IPAD devices ( max 4 ). So the main game would run from a PC which would act as a server ...
0
votes
2answers
41 views

c# Unity - Matrix output incorrect on vector rotation

I have a input Vector (1,1,0) when I run it through a Unity Matrix4x4 class with a rotation of 90 degrees around the Z axis the output is (-0.9999999,1,0) which is nearly correct but strange. But ...
1
vote
1answer
60 views

How to animate clouds

I am creating an open-world in Unity 4.5.5 and I do not know how to make the clouds move. This video of The Legend of Zelda: Wind Waker HD is a perfect example of the clouds moving in the sky. How can ...
0
votes
1answer
70 views

How can I allow players to draw decals for their avatar and items?

I want the player to be able to draw a simple symbol, even if it's pixelated black or white, that their character can have on their weapons, armour, forehead or even markers and monuments. How would I ...
1
vote
0answers
18 views

How to mirror flip animation curves in Unity?

I have a animation that moves my camera from left to right. Now I'd like to copy it with 'mirror' transformation so I can use it to move from right to left. Is it possible to do it using script or ...
0
votes
0answers
25 views

How can I use different fonts for different objects in Unity?

In Unity 3.5, I have a font that is strangely linked to four game objects. I want to put separate fonts on each object. In the Inspector, when I click on the circle icon next to the "Text" ...
0
votes
1answer
26 views

Trigger scene loading in one device from another device using Unity WWW class

I have a master device and client device. I want to load a scene in the client device by pressing a button in the master. My method is, when the button is pressed in the master device, a data is ...
0
votes
0answers
16 views

How to upload binary image data via POST in Unity through load balancer?

I want to use unity to upload POST binary to the server. However, my server used HAProxy and it triggered an error "The remote server returned an error: (417) Expectation Failed.". The cause of ...
0
votes
0answers
31 views

Choppy Character Movement Unity 2D [on hold]

I am new to game development and have been following a tutorial to get started, it is a flappy bird style game. My main issue at the moment is when tapping the screen to move my character it is ...
2
votes
0answers
30 views

Why is OnCollisionEnter2D called when it's layer's collisions are being ignored?

I'm sure this is down to my lack of understanding of the unity physics system. I'm trying to implement a simple one-way platform for a 2d game and have got stuck on creating a reliable way to let the ...
0
votes
1answer
33 views

Copying a texture's colors to a new texture to create a new sprite

Let mySprite be some .PNG sprite: Texture2D tex = mySprite.texture; Sprite sprite = Sprite.Create(tex, new Rect(0,0,tex.width,tex.height),new Vector2(0.0f,0.0f),1.0f); The resulting sprite can be ...
0
votes
0answers
10 views

Unity 3.5.7f6 font style of one object is linked to another object [duplicate]

I'm using Unity 3.5.7f6. When I edit the font style of one text area on one object, it changes another font style on another object to the same font. Is there a way to break this bond/link of font ...
3
votes
2answers
92 views

Find a position within one radius, but outside other radii

I have an Object A which will attempt to stay within a certain distance of another Object B. I would like Object A to also try to stay outside a certain distance of one or more other Objects R. ...
0
votes
1answer
31 views

Getting the Halo property of a point light in Unity

I am adding point lights in my scene ( max 6 ) and I want to be able to enable its Halo property via script. However in the documentation reference, they haven't mentioned how to enable the halo ...
-2
votes
1answer
51 views

How do I position a cylinder between 2 points? [on hold]

I found this code to draw a line between two mouse points. I want to do the same, but inverted; going in the other direction. The line should get larger from my first point toward the second. None ...
0
votes
1answer
47 views

How to combine the camera that follows the player and the camera shake effect in Unity?

I need to combine both camera that follows the player and the camera shake effect in the same moment. The problem is in that, if I make the shake effect for the camera, then the camera doesn't follow ...
0
votes
0answers
27 views

Unity 4.6 GUI causing issue [closed]

I am in a trouble. I have a Unity 4.6 button that is the child of an Image object. The button changes it's position and sets on the center whatever anchoring mode I use. The Tragic thing is that When ...
0
votes
1answer
72 views

Alternative to Update()

Here is my noobish scenario I'm trying to understand: Some class, Terrain: void Start() { ... switch (Type) { case TerrainType.StartPoint: ...
0
votes
2answers
94 views

Avoiding singletons for puzzle system [on hold]

Say for instance I have a puzzle with 3 switches that need to be in some configuration (say all on) in one room, that opens a door in another, with a load screen separating, so I can't link the ...
2
votes
1answer
59 views

How can I access a script variable from another script in Unity?

I'm creating a space shooter (think Space Invaders or Galaga) where the GameManager persists between scenes but the player and enemies don't. I need to access a boolean value from the player and ...
0
votes
0answers
11 views

How can you duplicat folders and not share old dependencies in Unity?

I have a folder with some prefabs, materials, textures, FBX, etc. My Prefabs refers to FBXs and Materials in this folder. Can I clone this folder in a way that it will save those local dependencies? ...
2
votes
2answers
94 views

Calculating gameObjects hit by a directional light source

I am trying to figure out in my current game whether a gameObject is lit by a directional light or not. Below is my image inside the Unity game engine As my game runs around a Day/Night cycle, I ...
0
votes
0answers
34 views

Create a sprite in Unity that has a border that does not change its width when scaling

I am trying to create a box that has a 10 pixel border and when I scale that box I would like the border to stay 10 pixels no matter the size. I am currently trying to create an empty game object ...
0
votes
0answers
36 views

Suggestions for porting games to a very low-rez screen [closed]

I'm working on a project where we have access to a big, very low-resolution screen. The screen is about three feet (1m) wide and eight feet (2.5m) tall. Its resolution is 24 pixels wide by 56 pixels ...
-1
votes
0answers
23 views

perpendicular planes are too lighted [closed]

I have this problem with Unity. From some days I have the free version of Unity and this issue happened. When I look the floor or a wall, I see a lot of reflection light. It seems that there is a ...
-4
votes
1answer
64 views

Move an object based on XML/TXT file [closed]

Let's think I have an file which looks like this: 0 1 2 3 4 5 6 7 8 9 10 11 I want to create a move from this file. For every 1s(mentioned in the file) I want to move the object. Is this ...
0
votes
2answers
98 views

I want to show total time spent by all players around the world in my game

I am developing a Unity3D game. I want to show in my game: Total time spent playing all time by all players around the world Total time spent playing in last 24 hours by all players around the world ...
0
votes
2answers
82 views

Unity yield WaitForSeconds() not working

I am new to Unity development. I started learning Unity by reading tutorials, demos, examples, and watching videos. And I am having some trouble with using this timer. Here is my code: void ...
0
votes
0answers
33 views

Share image on selected media [closed]

I want to share image on selected media that I capture through code. At present I have following code to capture image private void CaptureScreenShot() { Texture2D tex = new ...
2
votes
1answer
86 views

How to share values between different shader programs?

I am using Unity but this might concerns all type of shaders. I would like to know if this is possible to share values between different shader pass.Let's imagine that I am computing something in the ...
0
votes
0answers
69 views

Creating a arc path connecting two GameObjects in Unity

I am working on a game on a spherical surface which first of all is a big challenge in itself. I want to create a path on an arc which connects two points ( seen in the image ) and show an arc path ...
0
votes
0answers
29 views

Push Notification to start a scene

I was wondering whether I can use APNs in iOS to trigger an event in my game, like start a scene without user clicking the notification. Is it possible to use remote push notifications for events like ...
0
votes
0answers
28 views

Printing the values from the corresponding array [migrated]

Suppose 1 A 2 B 3 C I need to print the value corresponding to 1-> A I have put both in two array d1[1,2,3] s1[A,B,C] Now i need to print the value in the form shown in the above d1[0] ...
0
votes
1answer
59 views

How to render the sprites for a 2D soft body physics system

This is not a question as to how to achieve soft body physics, but rather if I have a mass-spring system how to modify a sprite with that information. I am using unity so I dont have access to vector ...
0
votes
0answers
38 views

How to move rigidbody player to its facing direction with AddForce?

How can I move a rigidbody to its facing direction? I've already tried this: rigidbody.AddForce (transform.forward * v, ForceMode.Acceleration); // v is a public float which gets a new value in ...
0
votes
1answer
38 views

Using IPAD's as controllers for a Unity game

We are making a Multiplayer game using Unity. The actual game would be run from a PC projected on a screen and the players would be using their respective Ipad as a controller to play the game. I am ...
-3
votes
1answer
34 views

Move the Object in y-axis when the timer increases [closed]

I have a model(.Fbx object),I have placed a timer.When the timer starts increasing the model/object should move down(along y axis).
0
votes
0answers
37 views

Texturing problem inside Unity

So I created a Hex Sphere using Houdini and exported it as FBX to Maya where I created UV's for the model to use it in Unity This is how my sphere looks inside Unity All the hexes are separated so ...
0
votes
1answer
46 views

Calculate needed speed and object's position in Unity3d

So i'm trying to calculate object's future position so my enemy can land to it safely. Idea is that using future postion I can calculate angle and convert it to direction vector and also using ...
0
votes
1answer
60 views

How can I inspect 3D model exactness? [closed]

I am neither a game designer nor a graphic designer. I am a .Net and C# software developer. I have a game project and I've still been studying to learn game concepts and technolgies for a year. ...
1
vote
4answers
122 views

How to read a data from text file in unity

Can anybody help me out with giving the steps needed for reading data from the text file in unity and how can the script be added.
0
votes
1answer
89 views

2D object grids to a dictionary

I'm pretty new to Unity and trying to figure out what a good way of transferring objects in a grid to a dictionary would be. For example, if i have a grid of 2D objects (squares) such as below ...
2
votes
3answers
146 views

How do I check whether a camera has unobstructed view of a GameObject?

I want to check if a GameObject is visible to the camera. The renderer.isVisible-method only checks if the camera is turned towards the object, not if there is anything between them (like a wall). ...
1
vote
0answers
56 views

How do I port a game to low-end phones?

I'm creating a 2D game using Unity. My intention is to have separate SD and HD versions of the game for Android and iPhone. However, it makes sense for me (due to information I have about my target ...
0
votes
1answer
55 views

How do I raycast to detect which hexagonal tile was clicked?

I want to detect the hexagonal tile a unit is on upon clicking on the unit. I was thinking of using a ray cast I can't get it to work. I'm trying to get the raycast to shoot from the bottom of the ...