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)

1
vote
0answers
42 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
69 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
146 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
26 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
90 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
28 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
118 views

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

How can I make an effect like this? With a particle system?
1
vote
2answers
32 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
39 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
39 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
51 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
95 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
48 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
96 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
48 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
51 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
68 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
62 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
584 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
133 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
102 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
54 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
49 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
50 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, ...
0
votes
1answer
52 views

Trying to make a 2D Spring

Still a Beginner at Unity 5 and this time I am trying to make a Spring. The spring would act as you'd expect. Something comes in with a direction and force, so you bounce it the opposite direction of ...
0
votes
2answers
51 views

Unity error after adding skybox material

So I added the night material from the fantasy skybox asset I download from the asset store and the rest of my objects turned white for some reason I figured it was just a glitch like the light baking ...
0
votes
2answers
61 views

Stamina Bar refuses to go back up

I am creating a very simple script for my stamina bar to go down when I press M, but when I am not pressing M, for the bar to go back up slowly back to 100.The bar goes down fine when I press M, ...
0
votes
2answers
32 views

how to access base UnityEngine function of object form other class

I want to know is it possible to access functions of object like Start, Update,OncollisionEnter of other objects class in another class. if the answer is yes please tell me how can i do that. Thank ...
3
votes
1answer
84 views

Does marking a GameObject as static actually improve performance?

I'm currently working on a small game that will include somewhat large levels. Each level will have a somewhat large amount of GameObjects lying around as props. I was told by a friend of mine that ...
-5
votes
4answers
106 views

How to access a variable from another script in Unity c#

I need to access a variable from another script in Unity, but I can't figure it out. Script: public class move : MonoBehaviour { public float speed; // Use this for initialization void Start () { } ...
1
vote
2answers
40 views

Finding the last GO in a set of generated objects?

I currently generate the maptiles using Tags purely, which works great but doesnt satisfy my needs. I want to delete tiles that i dont need(since my player will only be going to the right) but I have ...
0
votes
2answers
41 views

timeScale=0 doesnt stop all prefabs in unity

As expected timeScale=0 can be used for stopping the game or pausing but when i make timeScale equal to 0 some prefabs still move and they can shoot bullets but addforce doesnt effect to bullets and ...
3
votes
1answer
57 views

How to make a custom inspector component

I have a script component, but I want to know how I can add things like sliders buttons etc. I wrote a grid system that generates at the start of my script but I want to run it in editor when I push ...
0
votes
1answer
95 views

How can I destroy a game object across the network in Unity?

How do I go about destroying a game object across the whole network in a multiplayer scene in Unity? I can only get it to destroy on the local client and not for everybody else connected. I'm ...
0
votes
2answers
84 views

How to make score counter independent of framerate

I have a score counter, but I've noticed that the lower the framerate is, the slower it counts. How can I make it so it ignores the framerate? using System.Collections; using UnityEngine; using ...
1
vote
1answer
39 views

How do you use SoundManager for multiple player games over the network?

I have created a basic sound manager according to this unity tutorial (https://unity3d.com/learn/tutorials/projects/2d-roguelike/audio). However, I need it to work for multiple players over the ...
0
votes
1answer
72 views

Accessing a database with a php script from Unity mobile game

So I am attempting to keep track of some user data in my game that I am creating in Unity 3d. I am using Unity's WWW class to do this. I am following this tutorial: ...
3
votes
2answers
90 views

How do I find the location of a GameObject in C#

I'm making an elevator script. Essentially I'm wanting to find the difference between two empty objects so that I can move the elevator between them. To be able to do this, I need to be able to get ...
0
votes
0answers
38 views

Multiplayer rigidbody not receiving velocity syncvar on the client

I have a scene in which on a certain event the client spawns a prefab with the variables of position, rotation and rigidbody velocity set for it. It is working perfectly, it spawns in the right ...