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.
0
votes
0answers
5 views
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 ...
0
votes
0answers
5 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
1answer
21 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
15 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
0answers
14 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
0answers
7 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
13 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
21 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
40 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
3answers
57 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
0answers
19 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 ...
9
votes
1answer
508 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 ...
-1
votes
0answers
18 views
Setting my unity game to run in the background and then, after I tab out, CPU usages goes insane [on hold]
All in the title really.
That's a download to it if you want to see if it happens for you too.
0
votes
1answer
31 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 ...
-2
votes
0answers
23 views
How do you draw in 3d on unity3d? [on hold]
I'm not sure if this is possible, but if there are drawings of PEOPLE it must be. Do you have to pay money? Please say no. Do I have to code to draw? Please help!
0
votes
0answers
49 views
How to customize the real time clock in Unity? [on hold]
I watched some tutorials about creating a real time digital clock in Unity, but I want to customize my own clock so the game will run with the time that I have customized instead showing the real ...
-1
votes
2answers
39 views
What is the difference between getting a reference and creating a new instance of an object? [on hold]
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
26 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
38 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
68 views
Terrain making in unity [on hold]
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?
1
vote
1answer
34 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
30 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
37 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
30 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
18 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
24 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
29 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
9 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
16 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
31 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
16 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
238 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 ...
0
votes
0answers
13 views
Augmented Reality Desktop Application using Unity and ARToolkit [on hold]
I want to develop an Augmented Reality Desktop Application using Unity and ARToolkit. But I cannot find any good tutorials or documentation for this. I have tried the ARtoolkit website but it also is ...
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
14 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
14 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
10 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
59 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
14 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
25 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
10 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
53 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
21 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
31 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
29 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
20 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
39 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
26 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
34 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
20 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 ...