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.

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

Isometric Z-as-Y Sort Order issue in Unity

I'm struggling with isometric Z-as-Y tilemap sort order in Unity. I'm attempting to paint two layers of tiles into my tilemap. When I add tiles that I would expect to show "below" / "behind" my upper ...
0
votes
1answer
35 views

Moving my character/camera makes environnement jerky

I'm learning to make a Tilebased game with Unity and for that I use the Zelda alttp assets. I just have Tiles, a Camera and a moving Character with a rigidbody2D and a CircleCollider. When the Camera ...
0
votes
0answers
11 views

My platform disappears

Hello, I am having a problem right now. I can't seem to understand what this code does because I just copied this from someone, but my problem is my platform is disappearing when every time it almost ...
0
votes
0answers
16 views

Vertical push doesn't let the object fall down instantly [UNITY]

An object (Wall) is continuously moving forward on the X axis with a simple script: ...
0
votes
0answers
12 views

SetTextureOffset in meter per seconds speed

I have this code snippet that faking the tiling offset speed. Now i want to set the speed in terms of meter per seoconds. how to divide or multiply that i get a number which is meter per seconds: <...
0
votes
1answer
19 views

How to reset an incremental achievement in Googles Android API?

For example the achievement is "Pass 5 levels in a row without failing" It's incremental and has five steps. If a user hits an obstacle, this achievements score should obviously be resetted to 0. ...
-1
votes
2answers
20 views

Unity: RigidBody2D, Trying to Set rb;

So for Unity I've been trying to to do the code line public RigidBody2D rb; I've followed the gmetrix unity programming course and they do that just fine with the ...
0
votes
1answer
69 views

How can I gradually increase the speed of my game?

I recently made a replica of (Dino run) game in Unity2d. But I'm stuck on how can I speed up my game gradually. Should the game speed be increased or should I increase the speed of the camera. ...
0
votes
2answers
19 views

Unity 2D Tiles disappearing when i zoom in

All my tiles/sprites have 0 as their position on the Z axis, except my main cam which has -10. For some reason i suddenly couldn't zoom in without everything disappearing, I switched to 3D view to ...
0
votes
0answers
21 views

Implementing counter-steering for a drifting car in 2D

I could make a sliding car. but i want the counter steer functionality. My current model of the car has 4 wheels, all of them have a script handling the slip. am currently multiplying the side ways ...
0
votes
0answers
48 views

Enemy pick a player?

I'm trying to make my enemy pick a player from array that no enemy around him. "Around_player" it tells me how many enemies around player.Also, bool "PlayerSurrounded" tell me if enemies around player ...
0
votes
1answer
30 views

How to add force on an object when it landed on the ground?

when i add the force it jumps up and disappear after pressing the up key.I want it should addForce only when it is on the ground position.
0
votes
0answers
25 views

Using a Bluno beetle instead of Arduino Uno

So I am making an interactive game using Unity and an Arduino Uno. However, I now want to migrate my Arduino project onto a Bluno Beetle board. I am using the following code on Unity: ...
0
votes
1answer
23 views

How to Bring the Scene View Camera Controls into Game View

I've got a scene with a big sphere in the centre (the Earth) and a lot of smaller spheres around (the stars). Above is a screengrab in Scene View with the camera in the Front View position. I really ...
0
votes
0answers
24 views

Can I rely on a Navmesh for X/Z movement and manually place my agent on the Y axis?

I'm generating my terrain mesh around the player (along with collision mesh and Navmesh). It's tile based, when the player moved enough I generate necessary tiles render meshes, then collision meshes ...
0
votes
0answers
28 views

Why isn't OnCollisionEnter being called?

I have a hammer and an object to be hit in my scene. I put this line Debug.Log("Collided with" + collision.gameObject.name); to debug whether the function ...
0
votes
1answer
46 views

How to place a camera so that it always fits a plane?

I have a plane that can get its scale changed during the game, and I want to make the camera view it completely every time the plane has its scale changed. The only camera is set to perspective ...
1
vote
1answer
20 views

How can I reference classes from my scripts in my unit tests?

Bit of a noob question, but I'm having trouble getting unit testing working in Unity. I created a PlayMode test assembly, I toggled "Enable playmode tests for all assemblies" as directed in the manual,...
0
votes
1answer
13 views

Unity BoxCollider2D causes motion to be exponentially multiplied

I have a player and an enemy square for my 2D game (technically it's a cube, but it's rendered as a 2D character). I have a RigidBody2D attached to the player and the enemy each, along with a ...
0
votes
1answer
48 views

How to create video from camera?

I have a 3d scene and a camera; I want to create video file from camera pre-set movements. If it is possible, running application by command line (without needed to "show" at video, my camera) . Is ...
0
votes
0answers
30 views

How do I make a Transform object follow it's parents rotation

So basically i have a transform object parented to a gun. I use this transform to determine the position my bullets are spawned in, and their rotation. The position part of it works fine, but the ...
0
votes
0answers
37 views

Tips on Hiring Coders / Game Developer [closed]

I'm with a group of mix profession that planning a startup company in malaysia and is missing a Coder for our Game Development section. I need some advise on hiring coders(Hopefully apt in Coding for ...
3
votes
1answer
275 views

Why are assets (images) in Unity build reported as 28 times larger

I'm trying to reduce a Unity WebGL build size which, for the data asset, is currently at 30 Mb. I installed the Build report inspector. On clicking the "Source assets" tab and choosing "Size" it ...
0
votes
1answer
43 views

How do I get the size of a Plane in pixels and set it multiplied by some factor to be the size of a Sphere?

I am doing an attempt to make a 3D snake game, as an experiment but I am still a beginner. I have a Sphere that I wish to dynamically resize to be, let's say, the ...
0
votes
0answers
14 views

Unity - transform.RotateAround change to bigger circle

I am making a game in Unity using c# where the player object is rotating around the world origin. I am using transform.RotateAround to rotate around the center and I want the player to be able to ...
0
votes
0answers
13 views

Unity Mecanim: How do you set the default state from the entry node in a sub-state machine?

With Mecanim in Unity, it is possible to set the default state for a state machine by right-clicking on a state and selecting Set as Layer Default State. However, ...
0
votes
1answer
39 views

The camera does not capture movements in z-axis

I want to make a simple drag and drop card in Unity, where the card pops up a bit towards the screen when the drag begins (lifting effect), and then drops down back on the table when the drag ends. ...
-1
votes
0answers
30 views

insert multiple vectors into a single method [closed]

For example, I have this lerp where it takes a single array of type vector3. let's suppose I have two arrays in vector3 position and position2. I was wondering if you can insert some of them into my ...
0
votes
0answers
33 views

Shader with soft shadows and cel shading

I need help understanding what type of shader can create this type of soft shadow:l, where you can barely see that it is low poly: With standard lit shader you get this type of shading which I rly ...
0
votes
0answers
18 views

Latitude and Longitude to Vector3 Not Aligning

I am trying to align a marker sphere to certain places on a bigger Earth sphere based on the inputted latitude and longitude. The following is my code for this conversion, this code is based on the ...
0
votes
1answer
18 views

How to fix 'procedural skybox' visible horizon line on 'screen space camera' canvas?

I can see the horizon line through my screen space camera canvas. Here are the steps to reproduce it for 2019.3.0f3: create a new scene create a new material for the Skybox set shader to Skybox/...
0
votes
1answer
21 views

Manually update rotation of only Y-axis on Agent

I have some code to manage to rotation of my Navmesh agents: ...
0
votes
0answers
24 views

Animating a pendulum by using equation of motion

I want to animate a simple pendulum by using differential equation of motion in Unity3D $$\cfrac{d^2\theta}{dt^2}= -\cfrac{g}{l} \sin(\theta) $$ There is a coding challenge video to simulate a "...
0
votes
0answers
30 views

Unity webgl HTML5 - resolution is forcibly up-scaling

Through uploading test HTML5 builds of my game on itch.io and NewGrounds, I've noticed a problem with the resolution. In every resolution settings area I can think of (HTML5 build resolution, host ...
0
votes
1answer
10 views

UnityTeams: Files to publish but no Upload button

I am using Unity 2019.2.14f1 to build a game. As I am working with a team, we have decided to use Unity Teams for the collaboration. The project escalated and we ended up having to architecture a ...
0
votes
0answers
9 views

How to Tag sprites in tilemap unity

I am trying to detect collision with particular sprites added in scene using tilemap, collider is added to all the tilemap,Is there any way I can detect collision with only particular sprite from the ...
0
votes
1answer
40 views

Unity tilemap tiles animation

I am beginner in Unity and I have created tilemap using new tilemap system in unity which looks like this: I created a script that lets me swap tiles. First I click on some tile and than I choose ...
3
votes
0answers
31 views

How do I set up the microphone for an Android device in Unity?

I'm developing a simple android app that needs to use the microphone. I'm able to load my app on my Android phone using developer mode, but I do not understand how to enable the mic. How can I enable ...
0
votes
0answers
29 views

Layering Animation on Pixel Art Sprites

I'm currently having some trouble finding the best way to layer animation onto a 2D pixel art sprite animation. For example, I want to add various expressions and blinking onto a pixel art idle ...
0
votes
1answer
53 views

Setting vertex colors for a marching cubes mesh

I am making a voxel based terrain system (Yes, I know, very original...), anyway... Each voxel should have it's own color so the player can distinguish which type of material it is. For example: dirt ...
1
vote
1answer
34 views

Transform check should return null, but returns as initialized instead

In my Player script, I initialize my FirePoint transform using GameObject.Find in the Awake function. In the editor, I purposely misspelled the name of FirePoint to test if the null check inside of my ...
0
votes
0answers
18 views

Debugging built-in physics components in Unity

I have a particular GameObject with Rigidbody which I'm trying to move over time. If I move the object using its transform.position, it works fine. However, if I ...
0
votes
0answers
76 views

How can I reference a public static variable?

...
0
votes
1answer
40 views

In Unity, how do I make text/annotations appear when I mouse over GameObjects in playmode?

How do I make text appear when I mouse over GameObjects in-game? What is the Unity jargon for this? I'm assuming it's 'annotations'.
0
votes
1answer
58 views

How much does it cost to port a game? [closed]

Let's say it's a mobile game, so no heavy graphics. Target platforms - PC and consoles. As far as I get, it implies certain changes made to the interface and visuals, for instance. But if the engine ...
0
votes
0answers
21 views

pushing rigidbody with force to match mouse position [duplicate]

i'm making a game in which the player character, a 2d rigidbody, is controlled by the user's mouse dragging them. i originally made it so that the player character's position was made the same as the ...
0
votes
1answer
38 views

How can I fix a GameObject along one axis only when it is part of another object in Unity?

Hello I have an Object player and inside player, I have an object Boundary which is supposed to follow the player as he moves up or down only? (As the player moves right or left I don't want the ...
-1
votes
1answer
43 views

(C#) Need help with Shuffling a list

I'm making a deck building game in Unity and need a way to shuffle a deck of cards in a list. I've tried to use a version of the Fisher Yates Shuffle, but It's not working. I'm not given any errors, ...
0
votes
1answer
20 views

Unity LWRP Sprite Renderer Sorting incorrectly after upgrading

I'm making a project where every tile is a sprite renderer, this would work fine in the old unity system (from the fact that it used it until recently), but upgrading to the LWRP broke the sorting of ...
0
votes
0answers
16 views

Unity Particle not visible inside an object with vertexlit blended shader

I'm developing a game with unity and I'm using a sphere with a texture on it as skybox in my game to fade 2 skyboxes when its the sunset or the sunrise. But my clouds work with a particle system and ...