Unity is a highly cross-platform engine that focuses on easy art pipeline process and uses Mono as its scripting back end.
1
vote
1answer
9 views
What's the point of [HiddenInInspector] (as opposite to [NonSerialized])?
I understand the difference between [HiddenInInspector] and [NonSerialized], what I'm missing is the use case for [HiddenInInspector]: so far every time I've encountered it, it was used by developers ...
0
votes
0answers
15 views
Is it possible to make such product as “Age of Zombies” using cocos2d? [on hold]
Is it possible to make such easy rpg product like "Age of Zombies" using cocos2d? I see some tutorials (http://www.raywenderlich.com/39113/cocos2d-x-tile-map-tutorial-part-1) but I guess, that it will ...
1
vote
2answers
53 views
Trying to better understand Unity gameobjects
New to Unity, but develop in C# normally. I can't seem to get how / why / where to grab certain elements. For simplicity, I have a top-level game object, say a cube. I add a sphere to the scene as ...
0
votes
0answers
24 views
Implementing a group formation behavior
I am trying to implement a group formation behavior where all the units in my group follow a leader and maintain their position throughout. So far I am able to move them, rotate and follow the leader. ...
0
votes
1answer
27 views
Can't go above max speed with RigidBody2D.AddForce()
I'm having trouble making a character move faster than a certain limit using RigidBody2D.AddForce(). My game is a top-down 2D game (constrained to the x/y plane).
I'm using a float 'MovementSpeed' to ...
-1
votes
1answer
24 views
Finding and reading a script on a mouse-selected GameObject
I can't work out how to access and read changes in a script of a gameObject that has been selected. The script selects enemy objects with right mouse button and player objects with left mouse button. ...
2
votes
0answers
29 views
Copy a folder in Assets/Resources folder programatically depending upon a constant
I have a Unity3d project in which I have 200 games and some 350 scenes. Now I want to make separate builds for each game. All my assets are present in Assets/IgnoredAssets/ABC folder. To include these ...
1
vote
0answers
74 views
How to properly do top-down aRPG melee attacks?
I'm reposting this from my own thread in reddit's gamedev community, since there were too few responses:
I've been looking for some info on that, but I mostly find articles on the design of such ...
-1
votes
1answer
31 views
Recording time since last collision
I am trying to record time since the last collision happened.But this is not working as I expect it to.
So, numberLimitOfCollision is equal to 0 only in the begining,
Basically, what I am trying to ...
1
vote
0answers
22 views
Unity 3d 4.6b New GUI system doesn't take touch when already a touch event is occurring in 3d scene
I know this is beta version but..
I have a Canvas->Button which works fine when I tap it normally.
I have a joystick in my scene which is drawn by separate camera other than mainCamera.
now, while ...
0
votes
0answers
28 views
Animation is not playing
Some animation cannot be applied on the character.This the code I have used to play a animation on the character.Can anybody help me solving this issue?
void OnMouseEnter()
{
Debug.Log ...
0
votes
1answer
37 views
Downloading 10 images and storing their data with WWW
I would like to download 10 images, and store their texture data into my list. I don't really know how to do that - I heard that for this you use the WWW class, so I went:
List<byte[]> ...
1
vote
1answer
46 views
Why are shadows not snapping to the objects?
I'm using a directional light in Unity to cast shadows. However, the shadows don't appear to be "snapped" to the objects creating them. The object appears to be floating in mid air while it actually ...
-2
votes
0answers
32 views
How to create Timed Mode in Unity
I am creating a 3d Road rash kind of game in unity.
My player(bike) does not move in z axis but the track and enemies are moving towards it and hence make it appear to move.
I can already calculate ...
-3
votes
0answers
56 views
Getting the bike on first wheel
I am working on a unity3d game. I have been trying to figure out which function do I need to use to get the bike on its first wheel momentarily.Any help on that, please?
Like real world, when it ...
-2
votes
2answers
73 views
How to increase speed of GameObject?
I'm making pong game in unity3d with monodevelop(c#). I want to increase speed of ball when it touch ends of paddle corner.
my ball script:
using UnityEngine;
using System.Collections;
public class ...
7
votes
1answer
551 views
Why is my custom Texture2D blurry?
Have some WWW object downloading a .PNG image.
((SpriteRenderer)renderer).sprite = Sprite.Create(request.texture,
new Rect(0,0,100,100));
My sprite looks fine.
Now, let's be a bit ...
1
vote
0answers
15 views
Can I create a Sprite Asset using a downloaded Texture at runtime?
I know that Asset Bundles exist, and I'm already taking a look at them. But I'm still interested in this particular approach:
I am interested in downloading a .png image from the Web, and then ...
1
vote
1answer
70 views
How to make prefabs independent?
I'm working on a Unity's Project and I want to modify a prefab, more precisely I want to change the texture of a prefab. The problem is that my modification is applied also to other prefabs. I read on ...
3
votes
2answers
148 views
Where/how do I store configuration files in Unity development?
I am transitioning from working with cocos2d-iphone to Unity.
One particular thing I loved were the .plist files: you could easily put any sort of configuration data you wanted: for game levels, ...
2
votes
2answers
45 views
How to unpause a particular gameobject in unity?
Say, I have a GUI Menu attached in a game scene. The game will be in pause state by default. I did it by setting "Time.timescale=0.0f"; I want my game to unpause only when Play button clicked. My ...
2
votes
1answer
31 views
How can I add a batch of sprites to a list in Unity's inspector?
I have a C# script with a public property:
List<Sprite> someSprites;
I would like to add 20 sprites to it, from the inspector window. However, it seems like the only way to do so is to drag ...
0
votes
0answers
26 views
Is it a good idea to work with Unity to get ready for xbox one dev kits? [closed]
I have previously developed many popular applications (non-game software) but I couldn't apply for indie developer program for xbox one as I have no published games before.
I know that "may not be ...
1
vote
1answer
59 views
Why should I use getcomponent?
I have already referred the animator by using the statement,
Animator anim;
But,What is the use of getcomponent in awake() function.What happens without it.
1
vote
1answer
72 views
What does Quaternion.Lookrotation do?
I have this code,
if(Physics.Raycast(camRay,out floorHit,camRayLength,floorMask))
{
Vector3 playerToMouse = floorHit.point-transform.position;
playerToMouse.y=0f;
Quaternion newRotation ...
0
votes
2answers
41 views
Changing distance after some time on OnGUI Unity
Though I am using IEnumerator to calculate the distance travelled value, the distance is updated very frequently, how can I change that? and why exactly increasing the time in WaitForSeconds function ...
1
vote
1answer
77 views
How to rotate object not from it's center point but from it's another point?
I am new in unity and I am developing a game where I want to rotate my object I try this code for it.
if(Input.GetMouseButton(0)){
if(Input.GetMouseButtonDown(0)){
...
3
votes
2answers
137 views
What is the pixels to units property in Unity sprites used for?
I'm starting to learn Unity for 2D development.
So, I am importing several sprites into the game, and I couldn't help but notice that there is a "pixels to units" property, by default on 100. I ...
0
votes
1answer
40 views
Terrain (mesh) textures in Unity - blurry?
I've created a 3D mesh in blender which will be used as a terrain in Unity. Additionaly, I created a 900x900 texture which I'd like to apply as material to the mesh. However, unlike with the normal ...
1
vote
1answer
55 views
Correct multiplication order for a 2D Matrix
I'm currently trying to create a camera and entity/model matrix for my 2D game similar to that of Unity3D.
I've already tried to find answers to this question on stackoverflow/gamedev but i couldn't ...
0
votes
0answers
17 views
calculating avoidance forces for similar objects unity [duplicate]
I am trying to work on collision avoidance for my troops. Currently all my troops have their target object as the leader who is wandering in physical space. The troops just follow the leader but they ...
1
vote
0answers
20 views
Unity Free Inverse Depth Mask?
How would it be possible to create an inverse depth mask? In this case, I refer to a depth mask as a shader attached to a mesh that 'pokes a hole' through the current camera layer to let you see the ...
0
votes
0answers
11 views
Gameobject sprite size wrt NGUI sizes
I'm working on a project that targets mobile platforms. I'm facing problem with asset sizes. I set the UIRoot as fixed with manual height of 1080.
Next, i imported a simple black square (500x500) and ...
0
votes
1answer
40 views
Moving gameobject with animation according to my script Unity3D
I am developing a game with Unity3D with an horizontal list of elements which you can move with arrows. Here you can see an example:
I have created animations in order to modify the alpha value of ...
0
votes
0answers
27 views
Move camera from wherever camera is to pinned point
So, I need to switch/ move/ animate camera from point X (not point A,as I don't know where the camera is at that momemnt) to point B (place where you want your camera to move).
This is for ...
0
votes
1answer
67 views
How can I make an object change direction?
I have a moving cube that, when it moves over an arrow, should change its direction to the direction of that arrow. What would I need to do in order to accomplish this?
0
votes
0answers
19 views
Unity - 2D - Scaling to fit between two objects
The game is a top down 2d shooter and I'm facing trouble in doing this :
- I got a player 2D ship
- The player fires laser, which is a long thin image with box collider attached.
- What I want is that ...
1
vote
1answer
42 views
Pause on scrolling backgrounds
I have a typical parallax backgrounds. They are scrolling by
public float Speed=0f;
void Update ()
{
renderer.material.mainTextureOffset = new Vector2 (Time.time*Speed,0);
}
I have a ...
0
votes
1answer
55 views
How to show NGUI menu in the upper of a Game Scene?
I am new to Game Development. I made a menu with NGUI plugin. I have a background image in the behind of this menu. Now, I want to place my Game Scene in place of the background image. I have tried in ...
-2
votes
1answer
31 views
How create universal window prefab in unity [closed]
I want to create many window with content.
But i want window to be prefab to redesigning him.
Window(prefab)
Background
Content (not prefab)
1
vote
1answer
55 views
Usage of math.Atan2 in a 3D coordinate system with Unity
I have a simple question on usage of math.Atan2 function with Unity in a 3D environment.
I found this code on Unity's documentation for Math.Atan2. I changed it a bit to fit my
needs.
Vector3 ...
-1
votes
0answers
41 views
What is easier? UE4 or Unity 4? [closed]
Guys i am learning Unity right now. I saw some youtube videos the easy of Unreal and i am very very interested in it.
So what do you think it is easier? UE4 or Unity 4?
Editor wise and programming ...
1
vote
1answer
49 views
Objects don't instantiate at mouse position
I'm trying to get the player to shoot a projectile at the mouse position, however the projectile is shot in weird directions (http://gfycat.com/BothFluidHoneyeater).
Here is relevant part of my ...
0
votes
2answers
72 views
animation control problem
I have a list of .FBX object.When I drag that .FBX into scene its corresponding inspector Animation component(fig 1) appears but when I drag some other .FBX object into the scene the Animator ...
-3
votes
1answer
108 views
Game Lagging due to too much details [closed]
I'm making a car racing game where you drive around hills.
The game has some performance issues. At some point it starts lagging badly. After one day spent on this, I realized that when the car ...
1
vote
1answer
48 views
Wandering motion in Unity
I am trying to come up with a smooth wandering motion for my game-object using Unity. What I currently doing is rotate the object by some random angle calculated every 1.5 second delay. But I am ...
5
votes
1answer
401 views
Unity3D - How to tessellate 2D sprites?
I use dynamic vertex lighting on 2D sprites. On larger sprites the lighting is uglier than on smaller ones. This is because every sprite is just a quad of two triangles. Not enough vertices there for ...
0
votes
0answers
30 views
Is there a way to use a plugin with the free version of the Unity3D editor on OSX?
I'm making a plugin for Unity3d. On windows you build a .dll and put it in Assets/Plugins. This is only supposed to work with the pro version of unity but you can get it to work with the free version ...
0
votes
1answer
69 views
Moving object towards a target Unity
I am trying to implement a script where basically my players would reach the target destination. Below is my script
private void MoveTowardsGoal(){
if (Vector3.Distance ...
0
votes
1answer
39 views
Shared Material
I have this simple script, so the user touch one of the cubes all cubes with same material will change color.
One of this cubes must have the name of the color on it, only one, so the user touch the ...