Unity is a cross-platform game creation system that focuses on easy art pipeline process. It consists of a game engine and an integrated development environment. The game engine's scripting is built on Mono.

learn more… | top users | synonyms (1)

0
votes
0answers
59 views

Unity stream webcam to other player (Multiplayer)

I want to make it possible, that I can draw on the stream of another player in my Unity game. The networked drawing works just fine, my problem is to stream the webcam. I've got the webcam input ...
0
votes
1answer
37 views

Unity LineRenderer custom reapeted Texture with margin

I have a LineRenderer, which has 1 dot as texture, which is repeated over the whole line. Now I want to know, if there is some way to give this dots a margin, so that I can make the gap between them ...
0
votes
2answers
25 views

Getting input from just one Axis at a time

I'm trying to make a CharacterController2D Script for a simple 2D TopDown game, but i was wondering, what would be the best way to disable 2-axis movement? just allowing one direction at a time (Maybe ...
0
votes
1answer
73 views

Comparison of two 2d top down player movement scripts in Unity [closed]

I have been following along two different tutorials on making an 2d RPG and comparing the two movement scripts that seem to do the same thing but in different ways. Which is a better way when ...
-1
votes
1answer
41 views

Making the player Jump in like a Upper - Right manner in Unity

Ok so i'm new to unity and I am trying to make this simple ball game . Now in a situation I want the ball to jump in a diagonal manner (i.e W + D ). Scrip that I have makes the ball jump only Up and ...
0
votes
0answers
25 views

LineRenderer doesn't apply material in 2D Unity5

I'm making something that draw lines with mouse on top of everything (in 2D), but the color of the line is always purple even though I assign a material to the line renderer. I could change the color ...
0
votes
1answer
21 views

InvalidOperationException when peeking from a stack within custom editor

I've got a simple state machine for handling game states which works using GameObjects that I enable/disable in order to switch the states. Since some states can be loaded additively (such as the ...
0
votes
0answers
23 views

Unity's 'Ambient' Occlusion occludes everything. How to do it better?

I'm experimenting with custom AO solutions for Unity. While looking at the source for their built-in SSAO effect, I noticed the shader is doing this: half ao = tex2D (_SSAO, i.uv[1]).r; ao = pow (ao, ...
0
votes
3answers
63 views

Gameobject not destroyed OnCollisionEnter

I have this GameObject with the tag coin I am trying to destroy when the player collides with it using this code located in a player script attached to the player public void ...
0
votes
1answer
46 views

Alternative to System.Drawing for breaking an image into separate tiles in Unity

As far as I can tell, System.Drawing namespace is not available in unity. I there an alternative library to load and manipulate or generate images on the fly? Example: Imagine you want to make a ...
0
votes
0answers
15 views

Making unity inspector accept classes that inherit from a base class

I have a base class that has a lot of classes inheriting from it, I want to make a script that you can drop one of these derived classes into. How do i do that? abstract class thingy : ...
4
votes
1answer
117 views

How can I reduce the draw calls in a split screen game?

I am working on a split screen game with one camera per player. It appears that the number of draw calls is multiplied by the number of cameras I have, which makes perfect sense. More cameras means ...
0
votes
1answer
41 views

How to address a function inside an if condition using C# in unity 3D

I am new to game development and have very limited idea of C# syntax. I was watching unity 3D tutorials of UI and thought of using ModalPanel.cs and TestModalWindow.cs In a quiz game where 3 choices ...
0
votes
1answer
30 views

What is an equivalent of Swift's UIScreen.mainScreen().bounds in Unity 2d?

Basically, I am from a Swift SpriteKit background where UIScreen.mainScreen().bounds is a CGRect which represents the screen and can be manipulated in various ways like getting the middle of the ...
1
vote
0answers
41 views

Unity Browser inside UI Panel

What is the best option if I want to show a remote webpage inside a UI Panel in Unity ? I want to target android and iOs platform. I had uniWebView in mind but that thing is more like an overlay I ...
0
votes
1answer
68 views

Unity stats framerate vs Time.deltaTime

Googling around, a way for calculating framerate and displaying it as text ingame is using 1/Time.deltaTime. However, comparing this against unity stats FPS shows 2 different FPS. Which of it is ...
0
votes
1answer
28 views

Editing attached component property in Unity (C#)

This might be more of a general C#/programming query, but since it's game dev related, I'm putting it here. I am trying to randomise a property in a custom component (C# script) across several Unity ...
2
votes
1answer
144 views

How can I adapt A* pathfinding to work with platformers?

I have an A* implementation that works in "top down" situations where gravity is not taken into account for pathfinding. But, I am looking to modify to work in a 2d platformer situation. I am using ...
0
votes
0answers
25 views

Access Unity Webgl output from browser and vice versa

I receive a package of Unity webgl and put that into a course in Wordpress. The index.html produced form Unity is accessed inside an iframe there. This must be able to count user click when accessing ...
0
votes
1answer
37 views

Resolution independence (for touch input on different mobile screens)

I have drag mechanic in Unity game and I want to have same experience in all devices. I've done this before in another game engine and now that Unity gives us Dpi with Screen.DPI, it should be much ...
3
votes
1answer
89 views

Recognize hand drawn shape

I want to ask player to replicate a simple shape (triangle, square, star, anything that can be done in single stroke) with mouse or on a touchscreen. Orientation matters, size does not. Example: ...
1
vote
0answers
27 views

Unity: Build looks different then gameview: runtime reflection probes not working correctly

Im having a really hard time figuring out how to configure my reflection probes to update in runtime once I build. The game port view looks totally different than the build view. Ive tried turning off ...
3
votes
2answers
117 views

How can I create an “afterimage” effect like this one?

How can I make an effect like this? With a particle system?
-1
votes
0answers
35 views

How to Store the User Name Using Playerprefs

I Want to Store the usernames in game UI Window
1
vote
2answers
31 views

Unity3D - Determining if a spherical object is grounded using raycast

I'm making a game revolving around moving a ball around a space. My game has a jump mechanic, so I need to know when I'm grounded in order to determine when I'm able to jump. Best way to check this is ...
-1
votes
1answer
37 views

Unity3D - Resources load to materials, how to?

I think is a simple question, but I don't know nothing about it: I have an created material in my materials folder, I just want to apply it to the GameObject by script. I am trying ...
0
votes
1answer
36 views

Unity3d Resources.LoadAll<Sprite> empty array

In my resources folder structure I have myself a file, now in the unity editor this file is a Texture Type Sprite (2D and UI), now when I attempt to run this code in one of my scripts var icons = ...
0
votes
0answers
49 views

How can I find the rotation of a hinge joint?

I'm wondering if there is a way to get the rotation of a hinge joint. Not the actual transform.rotation/localRotation/Rotate etc. but like the rotation of the hinge joint component. For example what I ...
0
votes
1answer
84 views

Unity make dotted line renderer

I know, that this question was asked before, but I could not find a proper answer to this. So how can I make my line dotted? I added a texture with a dot, but it just gets stretched for the length of ...
0
votes
1answer
47 views

Wwise with Unity Rigidbody 2d or Collider 2d

I'm half way in making a 2D game in Unity and found that Wwise needed the game objects to have a normal 3D RigidBody, since that's quite some work to replace everything, is there any way around?
0
votes
1answer
25 views

Mesh disapears before out of fov

I use a C# script to move the vertecies of my quad around the world space. It works perfectly fine, but when I move/ rotate the camera away, so it does not look at the position of the quad, the quad ...
-1
votes
1answer
89 views

Add Boo or Python to Unity 5

I'm new to Unity , but I'm more comfortable with python , Is there any way to use python for scripting language in Unity 5 ? I heard there is some language called Boo that is syntax liked python but ...
0
votes
1answer
54 views

How to rotate camera counterclockwise around player?

Holder contains camera and rotates around player Camera looks like in diablo, titan quest, grim dawn, etc I cant rotate camera to negative angle values My code: public void ChangeRotation(float ...
1
vote
1answer
37 views

Implementing getters for a singleton script in unity

Ok the title might be a bit confusing but what I want to do is make a getter that returns the class, exactly like unity does with the camera.current. You should just be able to go class.current and ...
1
vote
2answers
41 views

Instantiate a 2D GameObject in certain direction

I'm working in a Top-Down 2D Game, and i'm trying to avoid the use of rigidbodies and rotations, i manage the direction the player is facing via input and changing the sprites, but right now, i dont ...
0
votes
1answer
47 views

Unity5 - Create navmesh for a random generated environment

I am following this tutorial to create a game with random generated mazes: http://catlikecoding.com/unity/tutorials/maze/ I want to add some monsters to roam around the newly created maze. How can ...
0
votes
1answer
69 views

Why does Input.GetKey(“enter”) never return true?

I want to modify an int variable on one script by having another script subtract 1 from it. But when I try to trigger this on an "enter" key press, nothing happens. 1st script: public class ...
1
vote
1answer
49 views

Make a light only affect one object

I'm wondering if it's possible to make a light source only affect one object? I know that it's possible to use layers and culling mask, but then I would need one layer for every single object which is ...
0
votes
1answer
41 views

How to change game background image when press button in unity?

In my game provide two background user can wish to change game background when user press button so how I can do this. I use a sprite for background.
2
votes
1answer
64 views

How to replicate Unity's Rigidbody.AddForceAtPosition in C++?

I am trying to replicate the function Rigidbody.AddForceAtPosition of Unity in C++, it means, to apply force to a body offset from its center. How could I achieve that in C++?
0
votes
0answers
19 views

Best way to do discontinuous animation? Or: Best way to animate a character with a jerky center of mass?

I am using Unity and need to know how to use it animation system properly for… well let me describe it below. In this game I have this big 3D block-like character that moves in an unusual fashion ...
0
votes
0answers
60 views

Emoji in InputField. Not accepting unicode character input

In unity, there is a limited number of characters you can type into an input field. I type in "😎" but it shows up as "�" I found a open source solution for regular text boxes ...
1
vote
2answers
56 views

How to align the corner of the camera with x= 0, y=0?

I need put Main Camera's bottom left corner at starting position 0, 0 (x, y) so all of its coordinates will be positive coordinates. I thought to put the pivot at the bottom left corner but I don't ...
3
votes
3answers
576 views

What is the difference between transform.translate and rigidbody.velocity?

I've been tying to understand what the difference between these two methods of moving a rigid body are. Both seem to move the object at a constant rate and both operate on a RigidBody. So what's the ...
3
votes
2answers
132 views

Need help with a field of view-like collision detector!

I ran into a trouble while making a field of view for my character. I figured how to make it work with a Linecast, but what I really need is a cone-shaped field, so that the character can detect ...
1
vote
2answers
100 views

How do game engines like Unity and Game Maker exports to other platforms?

From what I understand, if you want to export a Unity/GameMaker game from the editor, the game needs to be compiled to create an executable. But I thought to produce a Windows executable you needed to ...
0
votes
0answers
52 views

How to make a PROPER main menu (or any other UI windows/modals) in Unity?

So, I'm currently learning both about Unity for the first time as well as the 'new' 2D UI system, but I'm having a hard time figuring out how to make windows, modals/dialogs, main menus etc. which are ...
0
votes
0answers
48 views

Why doesn't this coroutine consistently finish?

I have a coroutine that operates like this: private IEnumerator decay() { while (Mathf.Abs(value) > .2f) { value *= .98f; Debug.Log("Value is now " + value); yield ...
-1
votes
1answer
25 views

Unity List spawner problem ? C#

I have four spawners in my scene that spawns four enemies. My problem is when I try to add game objects to the list it works but only for one spawner. My code if (Score.levelNum >=2 ){ ...
0
votes
2answers
48 views

How to mark a variable as prefab independent?

I am making a game that has a symmetrical level design. Each player own a portion of the map and each portion is the same. As such, I placed the portion as a prefab so that when I apply the prefab, ...