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

Firebase Cloud Messaging in Unity Android App

I'm trying to achieve the following behaviour for push notifications using Firebase Cloud Messaging for Unity in an Android app: If the app is in the foreground, handle it directly in the app (access ...
0
votes
1answer
53 views

3D A* Pathfinding Algorithm Help

I want to make a 2D turn-based-strategy board game, so I'll need to give my game some pathfinding logic so that units know how to move from place to place. However, I want my levels to have multiple ...
0
votes
1answer
27 views

Health bar without image collapsing to the centre in Unity 2D

I am trying to create a health bar that collapse symmetrically to the centre. The color palette of my game is minimal and the health bar is only one color that does not change with size. I am new to ...
0
votes
0answers
7 views

Root bone wasn't rotated, but after imported to Unity, animations were rotated and doesn't match loop

I made 9 animations in Blender and it passed humanoid type configuration(used rigify). All animations don't moving root bone at all(root bone position/rotation/scale is locked), however when I ...
0
votes
1answer
26 views

ToonRamp Shader + Normal Maps: How to keep strict lighting bands?

I'm trying to achieve a shading similar to the one on this image: Image 1: https://imgur.com/a/eTTvSCD To get something similar to this I wrote a toon ramp shader (similar to the one in the Standard ...
0
votes
0answers
22 views

Unity - Moving X amount of units to destination, RTS style movement

I have a reached a point now where I can select X amount of units, and move them to where I click. My problem is, they all try to get to the same point. I use Unity's own Navmesh + agent. I set ...
0
votes
0answers
7 views

Unity: InputField created from Script via TMP_DefaultControls doesn't have carat

I am trying to create InputFields in my Unity app via Script. Here is the code for the same. ...
0
votes
1answer
354 views

C# store functions with parameters in a List [closed]

I want to store functions with parameters in a List, so that I can call them at a later stage. Let's say (this is rough code) ...
0
votes
0answers
17 views

How to move a UI Image from one parent panel to another in Unity?

I have a Canvas and on it I have the TopPanel and the BottomPanel. Also I have an Image that at first is on the BottomPanel. ...
0
votes
1answer
55 views

What does the “DXGI Flip Model Swapchain” setting in Unity do exactly?

I'm preparing a Standalone Unity game for Windows and Mac. There is a checkbox in Player Settings called "Use DXGI Flip Model Swapchain for D3D11", which seems disabled by default. Needless to say, ...
0
votes
0answers
8 views

Camera rotates without camera reference

I have the camera set to go behind the object called "cameraS" and set it's x rotation to that object, and to move forward and backward along the axis behind the object. For some reason, when it moves ...
0
votes
1answer
35 views

Rest API as Remote Data Storage

I'm currently working on a minor multiplayer project which is made like a hacking simulator where your character can login to a "console"-like interface to permanently manipulate the system with ...
0
votes
0answers
15 views

Texture issue with shaderGraph?

I have dissolve shader for three texture images. I can see texture showing strange shadow and shinning line ! I don't know what I'm missing to add to my shaderGraph tree. Here is the result image. ...
0
votes
1answer
30 views

Pattern for modular ScriptableObject-Database?

Lets say we want to store game data inside of scriptableObjects and we have plenty of them... So we need to find a way to store them efficiently in a modular way. What pattern could we use to code a ...
0
votes
2answers
49 views

Player disappears when it collides with a tagged object

I am working on a simple game where the goal is to help a Player catch specific objects with a tag "Present". After taking care of the models, animations I am now working on the collisions and ...
0
votes
1answer
36 views

Problem with Blender model imported to Unity (Lighting problems)

I made a simple box in blender and imported it to unity. Now I'm facing with this weird lighting problem: I've been messing around with normals, duplicated vertex, lots of things, even lightning ...
0
votes
0answers
15 views

Would landscape left/right make difference when developing Google VR CardBoard Game with Unity?

I'm trying to make a simple VR cardboard game using Google VR SDK for Unity. I'm really confused about the problem as my title. Will the values got from ...
0
votes
0answers
13 views

Rotating TextMeshPro InputField around Z axis makes its text disappear?

I have a TextMeshPro InputField, and if I rotate it around the Z axis, its text disappears. If I rotate it by 2 and 2 degrees, it slowly gets "cut off". How could I solve this? I want to rotate a ...
0
votes
1answer
28 views

How to reset scene (stage1) when selecting it from Level stagemain menu

Good day I have a problem when the player finish stage 1 the screen look like this Then going back to selecting level When I try to play the stage 1 again. I want to reset the stage 1 so i can play ...
0
votes
1answer
30 views

Game navigation disabled after changing Quality settings

Just installed Unity 2019.11.f1(Personal)[Window10/64bit-Dx11 on Dx10] and ran the sample "Lightweight rendering pipeline" Construction Project. At the start,the game navigation keys [W-A-S-D] ...
0
votes
0answers
7 views
0
votes
1answer
35 views

Setting SteamVR Camera Target Eye before SteamVR installed in Unity

I'm writing a plugin that can be used in both VR and non-VR projects. I have a Camera that is used to display UI containing some game info on a secondary monitor. My problem is that when the end-user ...
0
votes
0answers
20 views

Reloading scene in Unity gives weird result

I am making an infinite racing game where you fly an airplane while trying to avoid obstacles. I recently finished my menu that comes up when you die. When I press the restart button that simply ...
1
vote
3answers
161 views

Is there a difference between using one large mesh with 100k polygons and using 1000 meshes with 100 polygons each?

I'm planning on creating a first-person shooter for mobile. Now I know that fps games usually have a lot of meshes in the scene (trees, buildings, terrains, etc.). So I've been looking at a lot of ...
0
votes
1answer
24 views

How and why can Physics2D.Raycast method be used in an if statment, as it does not return a boolean value?

Pretty much as the title asks, why is this code possible? if (Physics2D.Raycast(...)) { } even though the method itself returns ...
0
votes
1answer
15 views

Deactivate current object in array and activate next one by using button click?

How to deactivate current object in array and activate next one by using button click? ...
0
votes
0answers
10 views

Unity Animated Materials Won't Preview

I'm looking for help 'cause I just got into this issue with Unity 2019.2.8f1 and I don't know how (if possible) to fix it. I probably should mention that I upgraded this project from Unity 2019.1.0f2 ...
0
votes
1answer
105 views

I'm getting empty errors Unity 2019.2.14f1 Windows 10

A week ago I was editing a script in my Unity Project with VSCode(I normally work in Visual Studio) and saved it. As soon as I saved it 4 blank errors popped up. Since then I've tried everything to ...
0
votes
1answer
23 views

Unity 2D: Can’t resolve ArgumentOutOfRangeException: Index was out of range

I am very much a novice to coding with no background on this at all so the code you see here may be terrible. Basically I’m making an endless runner, made up of a player character and a set of ...
0
votes
2answers
64 views

How to keep instantiating enemies up to a set max?

I am creating a castle defense game where the enemy regulary spawns (upto limit of 24 ). After the enemy reaches 24, I want to stop creating clones. So far, I have been successful but I want to make ...
0
votes
0answers
14 views

Set parent by property

In the editor's hierarchy, if I drag and drop one object onto another, the second becomes the parent of the first, and moving the parent will cause the child to move. I see I can set this relationship ...
0
votes
0answers
33 views

Abstraction for player, NPC's, and monsters

I am trying to come up with a good abstract term for my players, NPC's and monsters. They can all have stats and inventory. so they all can function in the same way. But some could be humanoids, some ...
0
votes
1answer
24 views

Assets bundles have higher size than uncompressed sprites

I've created a script that generates assets bundles by compressing sprites using LZ4 compression. I need this in order to generate smaller files that I'll download from a server at runtime but after ...
1
vote
1answer
43 views

Rigged through Blender (Rigify) and Errors in Unity

I am working on a Unity scene and as the 3D model is missing the bones, I ended up going to Blender for the rigging. For that, I followed the procedure that Unity suggests by using the add-on Rigify. ...
0
votes
0answers
32 views

Fast moving rigidbody detects collision even when it's too far from the other collider

In my project I have the following game objects: one ball (rigidbody with Continous Dynamic collision detection and Sphere collider) target (kinematic rigidbody, Continous collision detection and NON-...
0
votes
0answers
30 views

How to highlight intersection between objects?

I'm new to Unity and I'm developing an augmented reality app. My situation is as follows: I have two objects in the scene, a neighborhood model and a cube. The mockup will be the object I am going to ...
1
vote
0answers
83 views

Vibration duration for mobile devices in Unity

I'm used the Handheld.Vibrate() method. I know that if you call it several times, you can increase the vibration time, but when it is called once, the vibration ...
0
votes
1answer
75 views

How to develop VR PC games without a Head-Mounted Display of my own?

I am an intermediate student of Unity 3D, and I am not able to purchase heavy and expensive equipment like Oculus Rift, HTC Vive, or other models that are not available in Pakistan. So I'm wondering ...
0
votes
1answer
67 views

Emulating 3d trajectory in top-down 2d game?

As the title suggests, I am wondering if it's possible to emulate a 3d arrow trajectory to a top-down 2d game? If you would look at this clip of Age of Empires 2 game, especially when archers are ...
0
votes
1answer
32 views

Nested transform.position in Unity

The following code works so good , but it is so long. How can I use a for loop to write a short script for any number of prefabs? ...
0
votes
1answer
31 views

Cannot implicitly convert type 'UltimateSurvival.ItemProperty.Value' to 'UnityEngine.GameObject'

As the title states, I am getting this error and I cannot figure out why. I have tried Google and I couldn't find a precise answer as to how to fix it. Error: Assets\Ultimate Survival\Scripts\By ...
0
votes
0answers
36 views

Script Component attachment order change on runtime

I have three components of script which are attached to different objects DisplayMenu ...
1
vote
1answer
27 views

Upper & Lower angular limits on Y and Z axes

My Task: I'm trying to replicate this project. I'm using unity as my physics engine. Currently I'm still learning how to work with the different joints unity has to offer. The type of movement I'm ...
0
votes
0answers
40 views

How to match obstacles with music in Unity? [duplicate]

How to match obstacles with music in Unity? I want to make a game like Beat Saber where game events are synchronized with the beats of a song.
0
votes
0answers
51 views

How can I get my entire game to scale based on screensize?

I'm currently building a 2d mobile game and I'm currently stuck trying to get my game to scale with screen sizes. Currently my background is scaled to 1920 X 1080. When I run the game on my Galaxy S10+...
0
votes
0answers
16 views

Unity Vector3 y and z Components being set 0

So I'm working on an RTS game and I'm trying to set pre-defined positions for units using my own formula. It takes the list of units and makes a position for each one in an array. The array then goes ...
0
votes
2answers
43 views

Instantiate objects in a List and use it

Why does the following code not work? I want to instantiate prefabs in a list and then use it as a GameObject like that : ...
0
votes
0answers
23 views

Unwanted rotations with transform.RotateAround

I didn't tough i would have issues with this, but unfortunatly I did. I have a Character (which is more a pile of cube) with a body, a empty GameObject for each leg attached to the body with a join ...
0
votes
1answer
67 views

What's a good way to draw multiple circles?

Why does the following code not work? ...
0
votes
0answers
24 views

Unity3D) Is there a way not to draw line renderer if vertex pos is zero?

I make a curved line with line renderer. and a sphere move along it. i want to draw a line only behind the sphere. so i do something like this. `` lr.positionCount = 256; ...