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
31 views

Standard file path for pictures in Android

I created a png file from an RenderTexture and I can save it to the standard directory in Windows. Now I want to do the same in Android. How can I get the standard picture path?
0
votes
1answer
37 views

Interact with texture / flat surface (Unity)

I don't know exactly how to put this into words, so googling did nothing really for me. Imagine a bowling game. On the oldern bowling lanes there was only a scheme of the pins above the lane, ...
0
votes
4answers
83 views

How to saving and loading animation curves

Is there any way to save an animation curve by playerprefs ? The animation curves in the inspector reset each time the script is changed (public variables added) I want record my animation In runtime ...
1
vote
0answers
35 views

Canvas not visible in my GearVR Project with Vuforia (Unity)

I created a simple AR project with vuforia and my Samsung GearVR, like described here : ...
0
votes
2answers
148 views

How to do moving Rorschach using Perlin noise in c# without shaders?

I want to be able to make a moving Rorschach using Perlin noise like in this question but I know nothing about shaders. Is there a way to do it in just c#?
0
votes
1answer
36 views

Unity3d multiplayer canvas

so I am making multiplayer game and I stuck on one thing, I have blood overlay canvas in my scene(you know, in fps games if somebody shoots you your screen becomes red and this stuff), and when I ...
0
votes
1answer
24 views

Moving occluders in Unity?

I've made a shader for a racing game in Unity that billboards a headlight glow effect (the lights are not actually light sources so I can't use lens flares). The quad with the glow texture is rotated ...
0
votes
1answer
26 views

Wheels not facing right direction when car faces different directions

I am creating a real time multiplayer driving game in Unity. I am using google play's real time multiplayer service. I am having an issue where the wheels of the cars that are over the network are not ...
0
votes
0answers
27 views

Cannot load native dll in Unity webgl build

I'm trying to use NAudio to get a mp3 (using WWW) into an Audioclip. The thing is NAudio uses Msacm32.dll which I tried adding to the project, but the webgl build still cannot find it. The standalone ...
0
votes
1answer
27 views

Select all components of certain type in the children Game Objects

I would like to set programatically the material on a Game Object. The problem is that it has several Child Objects, which many have their own sprite. I came up with this... foreach(Transform ...
0
votes
2answers
58 views

reuse texture between quad objects

This question is specific to unity: I want to spawn multiple blocks, each representing a letter. There will be more than one copy of an alphabet. I have a big texture which contains all the letters ...
3
votes
2answers
87 views

How to access the currently touched instance of the Prefab?

I have a prefab which is instantiated in the Scene and what I am trying to do is to disable with a touch or timeCounter but sometimes it disables all the instances of the prefab and sometimes 2 or 3 ...
-1
votes
1answer
40 views

Unity syntax highlighting with VSCode

I'm using VSCode, not VisualStudio for Unity scripting. VSCode has syntax highlighting for C#, which works fine, but all the Unity related stuff like Vector3 doesn't get any highlights. I know, that ...
10
votes
1answer
580 views

Unity - Order in Z layer for objects

Sorry if the title isn't exactly what my question is, I don't really know how to describe it. I have an image for my city floor and an image (same size) for all the walls or trees that the player is ...
0
votes
1answer
41 views

Unity - Hide GameObject that is behind UI

I have the following example: How can I prevent the part of the sprite that is highlighted in red and is behind the UI from being displayed on the camera, but having the background image still ...
-1
votes
2answers
41 views

What is the difference between getting a reference and creating a new instance of an object? [closed]

I asked a question a while ago and got an answer that I can either get a reference to the object or create a new one, like the below example: Example myExample = get some reference to the ...
0
votes
0answers
35 views

Unity3D - Android build has no Internet Access

I'm having trouble connecting to the internet in an Android build. I created a simple program that checks if there is an connection. Also I set in 'Edit > Project Settings > Player' the Internet ...
1
vote
2answers
43 views

Get world position of touch on objects

In my Unity3d game, I want to get the world position that was touched, when I touch a specific object, regardless of all objects that are in front of it. How would I do that, I only know ...
-2
votes
1answer
78 views

Terrain making in unity [closed]

I'm making a minecraft-like game, I'm trying to make a terrain made of cubes, but copying and pasting the same cube takes too much time and uses too much of my pc's RAM. So, any suggestions?
2
votes
3answers
82 views

Calculate average of arbitrary amount of quaternions (recursion)

Simply calculate the average for 2 Quaternions should work like follows right? : Quaternion.Lerp(rotationlist[0].transform.rotation, rotationlist[1].transform.rotation, 0.5f); And now I tried to ...
0
votes
1answer
39 views

Pixel Animation is tearing in Unity

I am working on a 2D game and I have created a simple sprite sheet. The sprite sheet represents a medkit. The size of the sprite sheet is 128x16 pixels with 8 different frames that animate the medkit ...
0
votes
1answer
43 views

How do I access variables using namespaces?

I've got a whole lot of scripts, none of them so far use namespaces. But as I get more and more scripts to deal with I thought it would be a wise idea to start using namespaces. I've never used them ...
0
votes
2answers
35 views

Unity 2D Following player on the x-axis only, at a constant speed

This following code does work, but I have one issue with it. Once the gameobject starts getting close to the player that it is chasing it slows down and does not continue going at a constant speed to ...
0
votes
0answers
20 views

Sounds in Unity game play to opposite speaker

I'm using Unity Game Engine. I have an AudioListener attached to my camera gameobject. Even though my earphones are in correctly, sounds that should be playing to my left ear play to my right, and ...
1
vote
1answer
29 views

Handle shared vertices in mesh deformation

I have a cube-sphere made from 6 planes. I am deforming each of the plane vertices using this code (C#): aPlane.transform.aPoint(vertices[i]).normalized * this.radius + (randomFloat)); This gives ...
0
votes
0answers
35 views

Using animation in Unity?

How can I simply implement this animation in Unity: codepen.io/epilande/pen/ZYMqNX I am ready to buy the PowerUI asset, if I have to.
0
votes
0answers
13 views

Distance fog smooth out plane's fade with respect to ground

I am looking for distance fog for my endless racing game. Unity's default fog system is too heavy for mobiles so for workaround I am trying to add large plane with transparncy..the problem occures ...
0
votes
0answers
19 views

Multiplayer Spawn not working

The error message I get is SpawnObject for Player(Clone) (UnityEngine.GameObject), NetworkServer is not active. Cannot spawn objects without an active server. I know that the server is ...
0
votes
2answers
34 views

Collider not working

I have a 2D object (without a parent) with a 2d box collider (dimensions are not small) added to it and set as trigger when I place it in the scene it works just fine however when I instantiate its ...
1
vote
2answers
27 views

Rotating a Sprite and Moving It along That Angle in Unity

first time posting here. What I want to do seems extremely simple, but I'm not familiar enough with Unity to be able to implement it. Also, I wasn't able to find an answer that exactly solved my ...
4
votes
1answer
271 views

Set a 'chance to spawn' for each GameObject in an array

I have an array of gameObjects in a spawner. I want to randomly spawn these gameObjects based on a weighted chance. I want to be able to manually set in the Inspector a percentage chance that an ...
1
vote
0answers
11 views

Unity: Built-In Shader Transformation Explanation Resource

I'm working on some of my first shaders and taking a look at the variables included by cginc I see this list of transformation matrices: I've watched some beginner talks and I understand what the ...
1
vote
0answers
15 views

Unity Trail for Eyes 2D

i want to make some kind of an Eye Tail effect for this charakter: I found the Unity Trail Renderer effect but the start of the Trial is perpendicular to the dragged/moved direction: Can i make ...
0
votes
0answers
16 views

Unify visual experience across different devices' screens

How would one approach the problem when your graphic assets (images, textures and so on) look different on different devices? For example, an artist made a set of graphic assets looking at his display ...
0
votes
0answers
14 views

How can I add a material to a property drawer?

I am trying to create a property drawer with the ability to select a material, but for there to also be other components, such as a min-max slider. I have successfully created the min-max slider ...
3
votes
2answers
64 views

Stopping 3D object in place

I am at 1.2 stage (moving the player) at Unity course "Roll-a-ball" and have question: I want to add feature that stops a player and sets his new position on 0, 0, 0. I can reset the position, but I ...
0
votes
0answers
28 views

Share Image on Android Application from Unity Game

I've captured screenshot in my game when player dies. I've following code to capture screen shot. RenderTexture rt = new RenderTexture (800, 600, 24); MainCamera.targetTexture = rt; ...
2
votes
1answer
30 views

How do I include XML files in an Android build?

I have a few XML files I want to include in a build of my game, and I want to have access to those XML files in Android. How to I store and load those XML files?
0
votes
0answers
22 views

How to compress an asset bundle and decompress it on iPad or iPhone

In have a prefab size of 2.4 mb, when I convert this into Unity Asset Bundle, the Asset Bundle is goes to 127.2 mb. How can I compress this into small size? My code is: public class ExportScene : ...
1
vote
3answers
55 views

Static variable not holding its value

I am creating a real time multiplayer game in Unity 3d. When a game ends I set a static boolean value called "waitingToEndGame" to true. In Update() it waits a few seconds before moving to a new scene ...
0
votes
1answer
24 views

how to manage loads and memory usage and process in unity

i wan to know level and scene management for memory and process management is handled by unity or not or developer has to handle these kind of works. for example think you want to know develop an ...
3
votes
1answer
42 views

place sprites in grid pattern within an area

I have been trying to do this for a few hours in unity now but cant get my head around it. basically i have 4 points(vector3) 1 each for the 4 corners topleft, topright, bottomleft, bottomright. now i ...
0
votes
0answers
31 views

How can I delete multiple scenes at a time from Unity's hierarchy panel?

I started using Unity this week and having some trouble with the interface. I can't figure out how to delete multiple scenes from the Hierarchy panel. I select them all and can't right-click "remove ...
0
votes
1answer
27 views

Unity 3D Move Object with RigidBody

I have added RigidBody component as well as Mesh collider to an object moved with keyboard. I know that it the object will go through another (with RigidBody and Mesh collider too) if I use transform ...
1
vote
1answer
48 views

Draw wireframe models for Gear VR app: Unity or Eclipse?

I want to create a 3D Android app for Gear VR that does/lets me do the following: Read an input file with a bunch of coordinates of points (including information about how they should be connected) ...
1
vote
2answers
27 views

Unity get more than 2 lines of log height

Unity does only display 2 lines in height for each log, at least with the default settings. I couldn't find a menu, where I could change this. I want to display a matrix, and I need to see the log ...
0
votes
1answer
36 views

Unity C#: Change speed when all Targets are destroyed

I have a game where a Gunner moves on a pre-set path towards a final destination. You play as a Magic Bullet that auto-fires from the Gunner's current position and can be controlled with WASD. When ...
0
votes
0answers
30 views

Unity websocketsharp is closing the connection directly

I got a working code, which I want to change a bit for better readability but afterwards my web socket is just closing instantly. First off, I got this code working : using UnityEngine; using ...
0
votes
1answer
19 views

how to bring movement and rotation vectors of object in the current scene in unity editor

sometimes in unity i need to zoom to fix the exact position and rotation of an object. but movement and rotation sign of the object always stays on object and i think its pivot of the object. How ...
0
votes
0answers
37 views

Dot product not working as expected

Recently I am learning dot product, While below code works from Unity's documentation, http://docs.unity3d.com/ScriptReference/Vector3.Dot.html public Transform other; void Update() { ...