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
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
51 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
34 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 ...
3
votes
1answer
295 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
15 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
14 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. ...
0
votes
0answers
35 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
22 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
21 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
26 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
1answer
11 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
10 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
47 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
35 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
56 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
1answer
22 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
77 views

How can I reference a public static variable?

...
0
votes
1answer
41 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
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
47 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
21 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 ...
1
vote
1answer
34 views

How can I insert a prefab instance programmatically inside the Canvas, in the bottom-left corner of the Canvas?

I am trying to create the Snake game in Unity, based on this video tutorial. I have also viewed this tutorial. I have created the new project with the 3D template and manually added the Canvas. I ...
0
votes
0answers
22 views

Not able to move quad wheel robot

I am trying to move QWAD wheel robot, I have grouped the wheels separately and added wheels colliders for each wheel. The problem is that the wheels are moving but the robot is stationary. I have been ...
0
votes
0answers
24 views

Tilt car to accomodate for larger Tire

I would like to rotate the car so that the front wheels are touching the ground without using physics. As you can see i want to rotate the car by angle a, but making sure that both tires are touching ...
0
votes
0answers
13 views

Unity - Load Lightmaps at Runtime

I'm a bit of a novice to lighting, but I think what I want to do is possible, so please bear with me. Due to the nature of my game, I've taken an approach where a singular scene ...
0
votes
1answer
27 views

How to prevent unwanted scaling of textures in world space

I allow players to select buildings of different sizes in my game, in the image below is a building that is 30x30 units and one that is 10x10 units. To indicate that the building is selected, I ...
0
votes
1answer
48 views

Making object move in an angle

I have a game with a beat-em-up perspective (think Final Fight, Streets of Rage) where movement is in X and Z. My movement logic consists of checking controller input of X-axis for X movement and Y-...
0
votes
0answers
15 views

Preview Clip of AudioSource, with audioSource settings in editor

I have a custom editor script wich permit me to add some behavior to a unity components: Here you see the extra extensions with the "test" label. I would like to add in that audio source editor, the ...
0
votes
1answer
51 views

How is actual object size in a scene calculated?

I've got stuck with 'pixel per unit' parameters and object scale. I've created two different sprites. A background picture, 1000x1000 pixels, and another one for a 'player', 200x200 pixels. I've ...
1
vote
1answer
21 views

Rotate a 2D object slowly to the touch position in Unity

I am creating a circular Joystick like setup in Unity. Played a lot with it in different ways but I don't get the desired results. ...
0
votes
1answer
40 views

2D party follow the leader in Unity?

I am attempting to make a 2d side-scrolling platformer where the player collects other characters as they advance through the levels, like you would in a classic top down rpg. However, I am having a ...
0
votes
0answers
17 views

Unity Anti-aliased Edge Shader with Variable Thickness (does not require standard shaders or post processing)

I'm trying to create a coloring-book effect for an edge shader (not an outline shader) but having some difficulty creating straight line shaders that don't look badly anti-aliased. (Even before ...
0
votes
0answers
21 views

SSAO in my unity games has flickering lines at the top and right side of the screen

I've tried both the built-in unity ambient occlusion that comes with the post-processing stack, as well as another one ported from the Microsoft MiniEngine by someone: https://github.com/keijiro/...
0
votes
0answers
31 views

How to stop background audio upon collision [closed]

I have a basic 2D game and have added some music in the background that plays on a loop. When my player collides with an object another sound plays to indicate that the object has been hit. How ...
0
votes
1answer
44 views

Visual studio alternatives for unity as intellisense not working [closed]

I am new to unity and unity tools for game dev are unavailable in vs community,i also tried vs code.So what are some alternatives for vs for unity scripts for a beginner?
0
votes
1answer
27 views

Artifacts at seams between meshes in Unity in isometric camera only

I'm trying to piece together some very simple placeholder models that I intend to use as tiles in Unity and I'm seeing odd pixel artifacts along the seams of the tiles that only show up when using an ...
0
votes
1answer
17 views

Unity Timeline character transform initial values

I'm trying to make a runtime cutscene in Unity using the Timeline editor. I have a humanoid character with an animation controller, track and a cinemachine track set-up in the playable. The timeline ...
0
votes
0answers
29 views

How can I customize Unity editor controls?

I have been using blender for quite some time so I know pretty much how it works, and I have just recently started using Unity. I find the unity UI to be very confusing and hard to use, and I was ...
0
votes
0answers
42 views

How do I add data to a Dictionary after I deserialize the data for the class?

I'm getting a null reference exception on "AddEmpireView()" and I cannot figure it out for the life of me. Here's the class: ...
0
votes
1answer
13 views

My vertex cache for reusing vertices in marching cubes algorithm in unity fails for one case, but I cant figure out what case

I implemented the marching cubes algorithm in unity and wanted to reuse vertices instead of creating new ones for every triangle. I am looping through a 3D array of points as I generate the mesh in ...
0
votes
0answers
31 views

Blender-to-Unity: How to import shape key drivers

I have a driver for rotating the eyelids and a driver for modulating the mouth's shapekeys. I have created a couple of animations of "just blinking" and "just grimacing", but what would be most useful ...
0
votes
2answers
129 views

Add oceans to an earth model with only continents?

I have the following earth model, it only has continents: I wanted to add water but as you can see, some of the continents are now hidden due to the water sphere being more round than continents: I ...
0
votes
0answers
17 views

Developing a menu of buttons in a ScrollView

Alright, So I'm very new to C#. Please forgive me. I'm sure this is a really easy fix, but It's been a while since I've worked on this project and I think I found the bug but I'm not sure how to fix ...