Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [unity]

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

Should my terrain be one big mesh or several medium ones?

While creating a subterranean level with probuilder (irregularly shaped rooms and corridors), I was wondering if I should merge all "terrain" meshes into one or keep them as separate meshes? What are ...
0
votes
0answers
4 views

How to calculate Admob Revenue?

Let's say you have a game called "X" This game has 1.000 daily users and let's say all of them watches only 1 rewarded video. How can you calculate your revenue according to this? Do you get your ...
0
votes
1answer
905 views

Adding Google IAP License Key into Unity Games

I have added Google Play Services and AdMob successfully into my app. But I want an in-app purchase button that lets you remove the adverts. (I have the button already but not the billing). Google ...
0
votes
1answer
29 views

Problem picking up a value, Delegate

I'm having trouble passing values that are inside an int function to an onclick delegate. this script causes the object to move in vector3 (-1 to the left and 1 to the right), these two values are ...
0
votes
0answers
5 views

Convert Kafka Thread related code example into Unity3d

I have code snippet of Kafka Consumer which i have developed with the help of this and here it is: ...
0
votes
0answers
6 views

Bullet Projectile Verticle Rotation

I'm very new to C# and Unity, and have been working on a projectile based weapon, and for the most part it's been working well. However, although the bullet fires facing the direction it's being shot ...
1
vote
1answer
221 views

Issue implementing wall jump in Unity

I'm having troubles implementing a satisfying wall jump in Unity. I managed to detect collision with a wall, but when I press the jump button, the result is alway weird or very weak. I think this have ...
0
votes
1answer
11 views

What is the purpose of the Allocation Callstacks button in Unity's Profile window?

I have an idea of what this button does, but I cannot find any specific information in the documentation. What information does this button add to the profiling data? How can I see this extra ...
0
votes
0answers
49 views

How to get past Visual Studio “Setup Error” for Unity development?

When I launch Visual Studio from Unity on my laptop, I get the following error: Setup Error The setup for this installation of Visual Studio is not complete. Please run the Visual Studio ...
0
votes
0answers
12 views

Unity Client and Multiplayer Networking/Architecture

My background is in Enterprise and SaaS web infrastructure. Zero information about games and how their networking works. I only know about the world of browsers and RESTful APIs. I'm planning on ...
0
votes
0answers
10 views

Low Res Atlas Texture vs. Many different materials without textures

So I have recently started to look into optimizing a medium complex 3D scene, more specifically i am looking to improve the performance i get from a fairly realistic bus. I am currently using the ...
0
votes
1answer
23 views

Emotiv Epoc integration with Unity

I'm coding a small game on Unity to control with the Emotiv Epoc headset. However, as I'm new to Unity, I'm having some trouble setting everything up to connect the device with my game. I downloaded ...
0
votes
0answers
9 views

How batching works in LWRP?

In LWRP do objects need to have the same mesh in order to be batched? I am asking because I have not found such condition in the docs strangely.
0
votes
0answers
6 views

LWRP. Shader Graph. Custom shader casts no shadow

I created an empty Graph by clicking Create -> Shaders -> PBR Graph. I created the material for this shader and assign it to my game object, but the object does not cast a shadow. If I assign the ...
0
votes
4answers
5k views

How to disable script component while in game?

I'm trying to make a C# script to disable the First person controller script component for my character. I'm doing this so that while I'm controlling something else such as a vehicle, the only control ...
0
votes
1answer
34 views

Gameobject rotation around anchored pivot

I'm looking for the best way to rotate the Camera(EYES) around a center of my character (Player Prototype) because if I turn around, the Camera enter inside the character. My FPS script is attached to ...
0
votes
1answer
37 views

Applying Y offset to rotation / position script

I'm using the script stated below to move a spray bottle around a head. The code works fine: I have assigned the script to the spray bottle, and I have set the head as the target. However, I was ...
0
votes
2answers
2k views

Using ShaderGraph for UI elements with transparency

I am trying to design some UI elements using shader graph. In this case specifically a lifebar that is transparent where empty. For a normal lifebar with a filled and empty color I got it working ...
1
vote
2answers
1k views

Hold touch at the screen to move object

I'm using unity2D and C#, and I have a code for touch screen: ...
0
votes
0answers
18 views

Make players Rigibody move in direction its going?

I have my snowboard character which I am trying to fix the movement for. At the moment, The player is using transform.forward on the rigidbody to move forward. If my player turns around and faces up ...
0
votes
0answers
13 views

How can I put an expandable UI element inside a Vertical Layout Group and make everything expand to fit its content?

I found this tutorial on how to build an expandable "accordion"-style UI element, but it doesn't seem to deal well with dynamic resizing. If I put a Vertical Layout Group inside the collapsible body, ...
0
votes
1answer
21 views

Can't control smoothness in Simple Lit

Smoothness slider is not active. Why and how to make it active?
0
votes
0answers
26 views

How can I reduce the size of a png in unity while maintaining picture quality

I'm new to Unity. I'm using Unity 2019.1.3f1 Personal. My issue is that I have created pictures (png) of a character in Photoshop. The picture borders look clean in Photoshop and looks okay, not ...
0
votes
1answer
30 views

Resize game object using single drag handle using Unity

Really need your help. I'm trying to create a custom controller for my app to allow users to resize and rotate game objects using a single drag object. I was able to create the code to create the ...
0
votes
1answer
11 views

Get rotation of camera in Google VR

I'm trying to move child of camera object smooth. To implement that, I need to know the movement of x and y axis, like Input.GetAxis in general PC platforms. I saw the documentation and examples of ...
0
votes
2answers
24 views

Unity using raw mocap data without actually moving the character

I play around with animations and unitys raw motion capture data asset pack. My problem is as followed: I have an idle, walkforward and a runforward animation and play them based on the keyboard ...
0
votes
0answers
16 views

Unity : Casting shadows of anima2d characters

I want to cast shadows of animated 2d character on a level like this : The only thing here I want is dynamic shadows for anima2d character as animation progresses.Is there a way of achieving shadows ...
0
votes
2answers
3k views

How to move my cube left or right using touch Inputs (C#) in unity

I am trying to create a 3d game in unity. I have a cube in unity and I want it to move left or right on swipe . It should move to a distance till where user swipe or take their finger off of a screen. ...
0
votes
1answer
25 views

Adding -90 degree Y rotation into script

I'm using the following script to move a spray bottle around a head. It should looke like in a barber shop. The code works fine: I have assigned the script to the spray bottle, and I have set the ...
7
votes
4answers
46k views

How to move gameobject with touch on Android [duplicate]

I'm trying to make a game where you control a character via touch on Android devices. The player will have two degrees of movement. When you touch the touch screen and move your finger, the game ...
0
votes
0answers
19 views

Visual Studio Code not working with Unity

VS Code Version: Version: 1.34.0 (user setup) Commit: a622c65b2c713c890fcf4fbf07cf34049d5fe758 Date: 2019-05-15T21:59:37.030Z Electron: 3.1.8 Chrome: 66.0.3359.181 Node.js: 10.2.0 V8: 6.6.346.32 OS: ...
1
vote
1answer
38 views

Variable from class doesn't show in editor

this may be another beginner question. I have a simple data holding script and want to pass one variable from it as parameter to a function. But in the editor it only shows me the script name, not the ...
2
votes
0answers
17 views

Shadow Glitch on Mesh Stitches

I use LWRP, one Directional Light and Hard Shadows with 1024 resolution. When I imported this super simple mesh from blender this happened: What is this weird line on the stitch of the mesh and how ...
0
votes
6answers
2k views

How can I Serialize other MonoBehaviour class for showing in inspector?

I have variables in my script but I can access these variables from other script but I want see them in other script without define again. I know about ...
0
votes
1answer
68 views

Set UI text using value from separate script

I've been working on the TANKS! tutorial from unity, attempting to add a U.I overlay that displays the scores of each player. I cannot seem to get it working with the current setup the game has: ...
1
vote
3answers
97 views

Spatial Jitter problem in large unity project

I have a very large environment where i am getting very weird view of objects as picture given below: As you can see there are black lines/spot, maybe the vertex lit problem. Currently I am using ...
0
votes
0answers
12 views

VS2017 (and 2019) Community Intellisense only showing part of the Unity class/method information, missing text info, any ideas?

If I mouseover keywords Input.GetKeyDown, for example, I know it should tell me something about using it for autofire. I get autocompletion and the syntax examples / override counts, all great things, ...
1
vote
2answers
28 views

How to change material color (LWRP)

I've upgraded my project to LWRP, I've changed my materials to: LWRP/lit. But in one of the gamemodes i need to change one my materials' color by script. I used to do it simply like ...
-2
votes
1answer
60 views

Why is my coroutines not working with in the if statement?

Isn't it possible to start co-routines under certain conditions? Or, it should only be started at the initial steps only? There is an enemy which will be de-activated after certain condition which ...
0
votes
1answer
30 views

Unity - rotating character for 2.5D platformer

I'm currently making a prototype for a college project in Unity. The game is a 2.5D platformer, though I've incorporated a script for the camera from a 2D platformer so the camera moves ahead of the ...
0
votes
1answer
12 views

Rendering Problems(Artifacts, Flickering) with the Mirage Solo VR Headset

Im getting some strange flickering artifacts when testing on device (Mirage solo), this problem occurs on Unity 2018.3.2 and Unity 2019.1.2. Its not happening on other devices such as the OculusGo, ...
1
vote
0answers
14 views

Troubleshooting Unity & Unity Hub Problems Behind Firewall

I'm teaching game design at a high school in the US. This means that we're behind a firewall that does packet inspection. Our lab machines are running Windows 10 and have the school's certificate ...
0
votes
0answers
12 views

How can I create a reverb zone depending on audio source location instead of the listener's position?

Is there a way to make a reverb zone act on an audio source not on the audio listener? Or in other words: Is there a way to apply an audio filter gradually depending on a position in space? Let's say ...
0
votes
1answer
20 views

How do I determine the rotation of a Tile using Tilemap in Unity 2d?

I want to know the rotation of the tile in C# in order to do some logic on another object that is sitting on the tile. The rotation matters for the logic. I don't see anything except GetTileData in ...
3
votes
0answers
69 views

How can I launch Visual Studio via a double-click on a C# script in Unity?

This is my first time using Unity and I am following the tutorial for the 2D RogueLike Game. Everythings seems to be working properly, apart that I cant get Visual Studio to launch, if I'm double ...
0
votes
0answers
5 views

How to use AssetBundles with Unity WebGL

I have a Unity WebGL project that tries to load AssetBundles, but I get an error: Unable to open archive file: http://localhost:50212/StreamingAssets/Bundles/language_english The code that creates ...
1
vote
2answers
45 views

Automatically create C# from manually created game objects

I have created 2 gameobjects along with its properties in the Unity Inspector. I have attached a screenshot below. For prototyping, I like the Inspector very much, but for runtime I prefer doing ...
0
votes
1answer
17 views

Unity Vertex Color Shader with Transparency

I'm trying to achieve a simple effect: I have a cube mesh and I want some of the vertices to change color. In this case, I want it to form some sort of a gradient where the unchanged vertices are set ...