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
1answer
12 views

Unity Assets Made By Unity for Commerical

I know you can't use starter and training etc.. assets made by Unity for commerical, but according to this every unity asset made by unity is restricted for commercial use. So that means I can't use ...
0
votes
1answer
11 views

Object jumping when it shouldn't - Input.GetAxis and booelans used - no raycasting - Unity

Here is my code. My object shouldn't jump unless its Input.GetAxis value is <= 0.05. However, it does. If I hit the space bar key before the object's Input.GetAxis value has dropped back down, it ...
0
votes
1answer
11 views

Overlapping Ovals

So I am instantiating 2 ovals/ellipses at runtime with random rotations. The first oval will always be spawned at the center. However, the second oval must be placed in a way that should always ...
0
votes
1answer
20 views

In 2D, how can I improve character rotation using raycasts when dealing with sharp/convex edges?

Edit: After making some edits to my polygon collider (based on @Alex F's suggestion), I can indeed confirm that sharp, convex corners are causing the buggy ...
0
votes
1answer
5 views
0
votes
1answer
12 views

Procedurally create a polygonal shape filled with texture in unity 2d

I want to procedurally create a polygonal shape filled with texture in unity 2d (no 3d meshes). Something that looks like this: https://www.conceptdraw.com/How-To-Guide/picture/landscape-plan/Building-...
0
votes
2answers
689 views

Diagonal movement is faster than horizontal or vertical movement (unity)

When using Horizontal or Vertical input keys, the the movement is normal. But when trying to move diagonal, multiple keys are to be pressed, and the speed just stacks up. Yes there are many answers ...
1
vote
1answer
26 views

Can I make alternate fragments drop(or make them black) based on a checkerboard texture?

Can I make alternate fragments drop(or make them black) based on a checkerboard texture in Unity fragment shader? I am using forward path rendering in my shader passes for lighting and shadows for ...
0
votes
1answer
17 views

Unity3D short joystick controller script acting weird

So basically there's a joystick and when the user pull the joystick up the controller moves the player forward, to the sides and backward and it's all good. the problem I'm having for example is when ...
0
votes
1answer
28 views

Second input not working when using 2 virtual joysticks

We are trying to make 2 virtual joysticks for both sides of the screen. Movement joystick can be enabled at any pressed position of the left side of the screen and shooting joystick can be enabled on ...
2
votes
1answer
98 views

Cannot assign values to variables (?)

I wouldn't say i'm new to unity or programming in general.. but right now i feel so stupid. I have a simple enemy script. I instantiate object with another script, calling SettingUpCreep and giving ...
0
votes
1answer
18 views

Mathf.Hermite not available in Mathf

I see here that Hermite should be function in the class Mathf. However, when I try to use it, the compiler tells me that Mathf doesn't contain a definition for Hermite. This is an example: ...
0
votes
1answer
30 views

Get a point inside an ellipse

So I have a sprite of an ellipse ( it is a 2D game). I would like to get a point inside this ellipse so I can instantiate something. How would I do that? Sprite won’t be changing the scale, so uniform ...
0
votes
1answer
37 views

How to move points of a multi-segmented bezier curve to one side

I am trying to move points from a multi-segmented bezier curve to one end of the curve using the following code which modified for my use from here. Only the last segment seems to give the desired ...
1
vote
1answer
38 views

How can one replicate the 'Quake Disruptor' of Wipeout XL/2097?

Following my previous question, I am wondering how one can achieve the same effect under Unity? The effect in action https://youtu.be/kzmmLeCwL0g?t=790 Description of the effect When you fire the ...
0
votes
1answer
147 views

How to completely stop the camera from clipping into the ground

Hi I'm trying to do a basic Camera Collision in unity, for convenience, here's the entire script (I actually got most of it from someone else who wrote the comments, if that's necessary to know): ///...
0
votes
1answer
71 views
+100

How do you animate/collide against a tessellated mesh?

Now that I have a implemented tessellation for my mesh, I am trying to understand how I can leverage the generated primitives. Example: I have the following track mesh generated procedurally, it ...
0
votes
0answers
13 views

Unity VR - Build marks XRSettings.enabled as false

I am having a problem in my project once I compile the build, it does not seem to detect the VR device connected. With a test script, I debugged whether the XRSettings's enabled property was set to ...
4
votes
1answer
32 views

What makes a shader function with a LineRenderer?

A LineRenderer has both Material and Color properties. But many shaders do not work, ie the line will not respect the Color property, or the line will show black (regardless of the materials having ...
2
votes
1answer
60 views

Closest node in A* pathfinding

For my 2D Unity game, I've implemented A* pathfinding based on waypoints. System already handles building graph from waypoints on scene (which are manually placed objects), as well as finding and ...
0
votes
1answer
38 views

Better way to handle speed able time and action in unity

I have came across a problem where i have to do some time based task(simulation) like, As the game started: After 2 mintues launch a missle. After 4 mintues star a train on track after 12 minutes ...
0
votes
0answers
23 views

Error when build a webGL game

I'm using unity 5.6.6f2 , and cannot build my project to WebGL. Screenshot of console: Errors: stderr: Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException: "C:\Program ...
0
votes
0answers
18 views

Send push notifications when realtime database change

How to send push notifications (status notifications) from one user to another? I mean a user of a unity MOBILE game to another mobile game? Both uses the SAME game on their mobiles. Thanks!
0
votes
0answers
19 views

How to make mobile movement using CharacterController

How can i change my movement for mobile i think left and right gonna work but i don't know what should i do for jump ...
0
votes
1answer
32 views

Unity, Object's vectors are not rotating with the object. what did i do wrong?

I found a youtube video (Sebastian Lague: Character Creation (E07: Unity character controller)) that has a really good movement script, I understood it and used it for my character. When I started ...
0
votes
1answer
23 views

Unity Editor - Call a method from a ScriptableObject from its own custom Editor

I have a class like this: public class NoiseMap : ScriptableObject { public string Hello() { //... } } Now I am building its custom editor: <...
-1
votes
1answer
40 views

Unity Ads Error

I'm new at Unity and was trying to build it. but after adding the unity ads to the game I started getting the error. please help UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors at ...
0
votes
0answers
25 views

Unity: Get excel type data from an html website

So is there a way that I can use an html page as a database? My end goal is to put everything into an excel sheet that the people I am making the application for want. I need to upload data from the ...
0
votes
1answer
44 views

Scale camera to fit screen size unity

My background and gameobjects are 2d sprites not UI images ,I want to know how to make my background scale with screen size and positions of 2d sprits on it don't change after building game (webGl) ...
2
votes
1answer
60 views

Calculate a random position inside a 2D area excluding a subset

Given this area - - - - - X X - - X X - - - - - I have a GameObject size 4x4 and inside another GameObject size 2x2. I know how to calculate a random position ...
1
vote
2answers
108 views

Load character instead of load level

I have some trouble finding out how I can load my character at the start of the level, instead of resetting the whole thing. The game mechanics are quite straight forward; don't touch the walls. If ...
11
votes
1answer
229 views

How can I make outline shader like “Life is Strange”?

I want to make sketch shader like life strange. shader has two part: 1.animated dashed line 2.noisy outline I like to know how can I make noisy outline? see outline of objects First I tried to ...
0
votes
0answers
18 views

Why is my Tile Map is not uploading to the pallete?

The tile atlas I made sliced and separated into different sprites. I opened the tile pallete window and created a new pallete. I dragged in the sliced tile atlas into the place where it said (drag ...
0
votes
1answer
58 views

A* Quad/Oc Tree path-finding vs Navigation Mesh path-finding

Main What are the differences between those path-finding algorithms. Is Navigation Mesh faster in finding the path? Is it more correct than Quad/Oc Tree? Does Navigation Mesh use Quad/Oc tree under ...
2
votes
0answers
20 views

Revert a GameObject to a previous version

Is there a way to use an old version of a scene.unity file to revert changes for specific GameObjects only? Occasionally Unity GameObjects can lose all their references in the Inspector (If a prefab ...
0
votes
0answers
23 views

Make an endless levels spawn randomly? [on hold]

So I want to create a game similar to those mobile endless runners where you run/fly forward/up/down and the level sections premade by the game developer are looping infinetly in the game. What is ...
1
vote
0answers
19 views

Importing Mobile Ads Unity plugin results in standard input InvalidOperationException

When I import Mobile Ads Unity plugin this error shows up. How can I fix it, and why am I getting this error? While the “Resolving Android Dependencies” dialog and loading bar is open, the following ...
1
vote
2answers
48 views

Using fixed time for Lerp

I would like to change a camera's rotation and position from its current position and rotation to a destination position and rotation. This should happen within a specific time (seconds). I call ...
0
votes
0answers
27 views

Blur shader showing Pink color?

I got this shader from GitHub page. In my scene, which is "LWRP" the image that should appears blur effect, it showing Pink color and there is no effect. Here is the shader script. ...
-4
votes
0answers
31 views

Game development future technology [closed]

What's the future of game development. VR or any new technology?
0
votes
2answers
36 views

Is it possible to add a sprite to a joint?

I want to have a joint between two objects, but I also want to highlight to the user that these two objects are connected together. I am assuming this isn't the correct method, as a joint is just a ...
0
votes
1answer
30 views

How do I interact ads with Unity Button?

I'm new to Unity and I'm a beginner. Unity ads have completed, but instead of the letter "E" and "T" I want the ad to come out by clicking the button. how can I write a code for it? using System....
0
votes
1answer
36 views

Convert coroutine into void

I want to get rid of a co-routine and do this with a void. How could I convert his IEnumerator into a void? ...
-2
votes
0answers
22 views

Unity job is fail error [duplicate]

didn't have a problem in advance but after updating the unity and adding the unity ads I started getting this error. please help.
1
vote
1answer
21 views

Unity tilemap collider not colliding with rigidbody

In the wireframe you can see the tilemap collider for this hill. The red circle falls right through however. The circle has a 2D rigidbody attached. Everything is on the Default sorting layer and on ...
1
vote
0answers
17 views

Using Unity Post Processing v2, how can I apply processing effects to just the UI?

I am using Unity 2018.3 with HDRP 4.9, and Post Processing 2.1.3. I would like to apply post processing effects (i.e bloom) to the UI only. I tried the 2 camera approach, but still can't get it ...
0
votes
0answers
47 views

Unity: how to mimic the lighting of a mesh as seen in the editor view

I have a camera which shows a "bird's eye view" of a procedurally generated mesh like so: Currently in the editor view (right), the terrain looks exactly as I would like it to. However, in game (left)...
2
votes
1answer
87 views
+50

Is it possible to apply a texture to a 2D-sprite in unity 2-d?

I want to take an (animated) 2-d sprite and apply a texture to it. Basically, I want every non-transparent pixel to be covered by the texture (color is disregarded). I understand I can probably ...
1
vote
1answer
57 views
+50

How to write a PBR Unlit Shader in Unity?

I have a REALLY specific case here: I have an Texture (a webcam), that is used by a shader to pickup a few x,y colors at the cordinates, and renders to a ...
0
votes
1answer
31 views

How can the ball moving like billiard after collision with wall?

I tried ball.velocity = Vector3.forward * speed and also *=-1 when the collision is occurred(It only works for straight way. But I want the ball movement be liked in photo. How can i do it? Thank you ...