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
2answers
69 views

GameObject's scale gets 0 after being parented in editor

1) Before 2) After being parented. I found a pattern. When adding the child, if the parent's scale.z = 0 the child scale.xyz becomes 0 on parenting. If the parent's scale.z != 0 it works. Another ...
0
votes
2answers
3k views

Basic C# Script in Unity3D for firing a bullet (not working)

working on a 2D top-down view game. Im trying to get my player to fire a bullet when spacebar is pressed. I added a component to my player (a bullet sprite) and placed it under his gun (so you can't ...
1
vote
2answers
180 views

Unity associated game object is null when running

I am just starting with Unity. I have two UI Text game objects, Atext and Btext. I have associated them by drag-dropping with my PlayerController script public variables, say public Text atext and ...
0
votes
0answers
144 views

Will I be able to use scripts included in an Asset Bundle as long as the script was in the game build?

For example, I have a script, let's call it "script.cs". If this script is in the script folder(somewhere inside the Asset folder) during build, will I be able to reference it(load an object with this ...
2
votes
2answers
202 views

Simulating beer pong physics in Unity

I'm trying to create a simple beer pong game in Unity. The basic idea is this - when it's your turn to shoot, you use your mouse to pick a point on the table that you want the ball to hit and bounce ...
0
votes
0answers
89 views

Building an animated player character from a rigged model

I have a rigged model and different animations of the same model (in C4D) - i.e they are different .fbx files. I have imported them to Unity and would like to make it a player through the Animation ...
0
votes
2answers
1k views

Moving a character depending on the direction he is facing (C#/Unity3D)

Right now I have a small soldier on the screen that moves with W, A, S, D and rotates / changes direction with the arrow keys. What I want to happen is when the player's direction changes (by using ...
5
votes
2answers
5k views

Creating a countdown Timer in Unity

I want to create a countdown timer in a Unity game I am creating. Up until now my game was running for a specific time but I was using InvokeRepeating to end the game after the set time. But now I ...
1
vote
1answer
147 views

How to properly activate trigger objects?

I have made a flying cat that follows the player, but I want the cat to be a separate object. Cat is following the player and as soon as it sees a collectible it grabs it for the player and then ...
1
vote
1answer
182 views

Unity3D Tag as a public variable in editor

How do you incorporate Tag strings into a scripts editor found in the inspector? What it is I'm babbling about: When you create a public GameObject fooObject in a script, it shows up as a box that ...
0
votes
1answer
215 views

Why is C# method not showing up for button's On Click()

I have a C# script called MainMenu.cs Here it is in its entirety using UnityEngine; using UnityEngine.UI; public class MainMenu : MonoBehaviour { public Button btnPlay; // Use this for ...
0
votes
1answer
70 views

Importing .anim files created using the Unity Animation controls

Our artist created some .anim files using the built-in Unity Mecanim system (where you use keyframes and drag various body parts to construct the animation). However, now we're trying to export them ...
1
vote
1answer
494 views

How long is SystemInfo.deviceUniqueIdentifier?

How long is SystemInfo.deviceUniqueIdentifier? The official docs say nothing about it. Obviously I can do a few tries, but these will definitely not be conclusive: did someone either gather extensive ...
1
vote
0answers
205 views

why is my (from example) shader appearing as black?

I have the following (very simple) shader: #pragma kernel CSMain RWTexture2D<float4> Result; [numthreads(8,8,1)] void CSMain (uint3 id : SV_DispatchThreadID) { Result[id.xy] = ...
1
vote
2answers
129 views

Unity3D: Storyboard-esq animation - a beginners question

As part of an interactive book I'm developing in Unity3D, I'm attempting to make an introductory scene that consists of moving lots of objects at different times - usually when another animation has ...
2
votes
1answer
401 views

CPU Usage and Available Ram in Unity 5

In Unity 5 I would like to be able to print out the CPU Usage and Available Ram left in MB. I followed the code posted on http://zamov.online.fr/EXHTML/CSharp/CSharp_927308.html and used it, however ...
14
votes
2answers
920 views

Make platform's visibility distinct from background

I have a 2d infinite runner type game which background is changing its colors constantly. Meanwhile the color of the platforms stays the same. This way the platforms at some point(when their color is ...
0
votes
1answer
100 views

Sprite disappears after adding a material to it

I have background which is FirsLayer, order in layer 0 and platform over it which is FirstLayer, order in layer 1. Once I add a material to the platform, the layer doesn't seem to change but it ...
1
vote
3answers
139 views

In Unity, how do I set the window's size?

Say I want a "world map" (maybe think the overworld in ff games) with dimensions 800px by 600px. How would I do that? Is this tied in with the resolution? Because I know you can set the game aspect. ...
3
votes
1answer
216 views

RPC events with client side interpolation

I've implemented client side interpolation, where a specified delay is put on each client. This allows them to interpolate between positions and rotations. Unfortunately, this means every thing else ...
0
votes
0answers
91 views

Colliding of 2 moving objects

I am making 2d Game with my own Physics (without using of Rigidbody - some kind of challenge for me). I have two objects which are moving, and their velocity vectors. I have some unmoving objects. ...
0
votes
1answer
690 views

Unity 5: Accessing a C# variable from Javascript

I've set up a SQLite database with Unity. Into this I would like to add the current CPU Utilisation. The SQLite scripts are in Javascript and the method for finding the CPU utilisation is in a C# ...
1
vote
1answer
188 views

Overriding all object inspectors in Unity

How can this be done? I want to add a single label to every component( including non-misbehavior ones ) in the inspector. I've tried: [CustomEditor( typeof( Object ) )] And: [CustomEditor( typeof( ...
1
vote
1answer
256 views

What would cause my script generated buttons and text to show in Unity and not on my phone?

I am using Unity 5 and the built in GUI tools. My static GUI shows up just fine which makes me think it's not a text/font issue or some such. Again, it all looks good in the Unity editor when I hit ...
1
vote
2answers
88 views

Accessing a newly Instantiated Object

I currently am creating a script that allows the player character to attack by shooting orbs at foes. I have the current code to do that (not final code, for testing purposes): ...
2
votes
1answer
52 views

Does the order in which RPCs are called match the order they are invoked locally?

For example: void A() { Debug.Log( "A was called." ); } void B() { Debug.Log( "B was called." ); } void C() { NetworkView view = GetComponent<NetworkView>(); if( view != null ) ...
0
votes
1answer
38 views

unity how to keep prefabs updated

I have a number of prefabs in unity and I regulary update them, is there an easy way make sure unity updates these prefabs so that I don't have to update 20+ identical objects in identical ways acros ...
0
votes
2answers
1k views

Unity how to change material properties at runtime

I'm working on a unity game where I want to change the color of a material from within a script. The material applies to a line renderer. I currently have the following script: using UnityEngine; ...
1
vote
0answers
68 views

On the State of Unity3D with regard to Linux [closed]

I'm not particularly new to coding or to Linux, but I am new to game development as a hobby. After some reading, listening, and watching, I have found that Unity is by far the best option as a game ...
0
votes
3answers
344 views

“Hold to jump higher” suddenly outputs a much higher jump

I'm programming my first game in Unity and I'd like to make a very controllable jump. The idea is to apply an upward force while the player is still pressing the jump button, and then after some time ...
0
votes
0answers
41 views

Scale Gameobject with defined size in pixels

I'm still new with Unity (5.0.0f4 Personal). I'm working on a simple memory game, three levels with different number of cards to find pairs. I want my game to display cards on different screen sizes ...
0
votes
1answer
57 views

Hierarchical “Select GameObject” Dialog or names with prefixes?

I am attempting to connect a series of teleporters with entrances inside a single scene. Once the player touches a teleporter he is moved to another place. I am doing this by simply connecting two ...
0
votes
0answers
136 views

Unity - UI Mobile - Script Generated buttons/text not seen?

I'm trying to generate some buttons and text dynamically with Unity 5.0 All of my code seems proper. It looks great when I play it in the editor. Everything is generated and placed and sized as I want ...
0
votes
0answers
148 views

Rich Text on InputField breaks Content Size Fitter functionality. Need some help

I'm currently using the input field as a way to make normal(ish) text in Unity. Refer to this question for more detail: How do I go about making a text box that allows for highlight-able and copyable ...
1
vote
0answers
237 views

How do I manually submit a new UI InputField in code?

I need some conditions for submitting the text inside of an Inputfield, however I cannot find a way to do this via code. I was expecting something simple like with WPF or WinForms, but I cannot find ...
1
vote
2answers
86 views

player does not collide with walls unity 5

I just started a new proyect with a personalize first person controller, like arrow move style, it worked, but when I tryed to collide it with walls it did not happen, I tryed adding a capsule, then ...
1
vote
1answer
294 views

How do I go about making a text box that allows for highlight-able and copyable text in the new UI?

I'm trying to make a simple chat system for our games lobby, however I am having issues making a text box that allows for text-highlighting. The Text component does not have interactible text, and the ...
2
votes
1answer
129 views

Can I release the source code of a game created with the personal edition of Unity?

Does the license of Unity Personal allow the publishing of the game's source code? We want to develop a game on a hackathon and publish the code thereafter. Is this possible?
0
votes
1answer
63 views

Generate platforms and move them with same speed

I'm building an infinite runner and have to generate pillars on which the player jumps. There's a minimum and maximum value for how much gap can exist between two pillars. In addition to this, i want ...
2
votes
1answer
471 views

How to check if a test ad is ready

I was going through UnityAds for Unity3D, and came across this setting: AD TEST MODE Force all So as I understood it states that I will be able to see real ads, in test mode, without ...
0
votes
0answers
50 views

Entity interpolation with a Unity listen server

How can this be done? I've implemented client side interpolation but I'm at a loss on how to implement it on a listen server. In order for the listen server player to see the same thing as the ...
0
votes
1answer
263 views

What are the legal issues when using free Unity Assets on a commercial game?

In the unity asset store one can find tons of thousands of assets, a lot of them being distributed for free. When using a free Unity Asset is it implied that you can do anything with it(commercial ...
0
votes
0answers
88 views

Applying Image Effect to specific texture uploaded and not to both texture and background

Hi I was following this script and shader example for brightness, contrast and saturation. I was able to follow along by attaching the C# script to the main camera and the shader to the script object. ...
0
votes
0answers
188 views

Unity3d 5 - default assets RollerBall+MultipurposeCameraRig rotation/tilt problems

I started a new Unity3d 3D project. I imported the Player, Camera and Prototyping assets. I placed a FloorPrototype64x01x64 and scaled it *2 on all axis. I reset it to 0,0,0 position and rotation. I ...
0
votes
1answer
96 views

How to generate objects at specific intervals and make them move with same speed?

I'm creating an infinite runner where character has to jump on randomly generated pillars. The pillars are positioned with a gap between each of them. The gaps are dmin and dmax. In addition to this, ...
0
votes
1answer
81 views

Unity 2d - Destroying foreign object from script + seek explanation about destroying objects

I have simple emmiter which sending enemies toward player in center of screen. Player can shoot missile (also emmiter). I want to destroy enemy AND missile in same time. Here is my code attached to ...
1
vote
1answer
485 views

How do I Rigidbody.AddForce(Vector3) in Unreal Engine?

I am coming from the Unity Engine, and trying to get my feet wet with Unreal Engine 4.8.x. I want to add a one-time force to an object. To accomplish this in Unity 5, I would use: void Start(){ ...
1
vote
1answer
102 views

Unity3d Colliders not working on my characters [closed]

I have create 2 characters in maya and imported them in Unity3d. I am able to move and animate them in unity but the characters are not colliding with each others. I have tried all major colliders ...
0
votes
0answers
98 views

vuforia unity how to detect that we have “ lost track of” an object

I'm working on a vuforia project and would like to be aware when vuforia can no longer detect the object in unity. Is there an easy way to write a script that is executed opon loosing track of an ...
0
votes
0answers
386 views

Unity changing texture of RawImage from code

I have a UI element, RawImage, which I would like to change the texture of based on which random number between 1 and 6 is generated. I want to change the picture of the dice, but I don't know how ...