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

How to increase animator state speed with parameter through script?

Inside Update : ...
-1
votes
1answer
19 views

How do I get the main camera from a root object?

In my scene, all objects are children of game object named "SceneRoot". The main camera is a child somewhere in this hierarchy, for example at ...
0
votes
1answer
65 views
1
vote
0answers
26 views

Issue in launching game in Amazon store

I developed a 2D game in Unity3D for Android. I tried to Release the game in the Play store and Amazon app store. In the Play Store, it's working fine. When comes to the Amazon store the game is not ...
1
vote
0answers
47 views

Why does the clip length of an animation not match my math?

I need to re-create an existing animation. The new animation should have the same amount of frames and length and FPS. Unity shows the following for the original / existing animation: As one can see, ...
0
votes
0answers
52 views

Unity 3D - Make character look at mouse with New input system/Character Controller

So I've been trying to make a top down game with the new input system. Been trying to make the character rotate and look at the mouse's position. The player moves on the x and z axis, with the camera ...
0
votes
1answer
11 views

SpriteAtlas's sprites not initialized in ScriptableObject?

I am trying to implement a simple abstraction over SpriteAtlas where I can simply request texture coordinates for a certain ...
0
votes
0answers
42 views

How to make under-construction sprites have blueprint graphics?

In my game, every placeable object and structure will only be placed as a blueprint, which the characters will then automatically build. An example from "RimWorld": Objects placed as ...
2
votes
0answers
32 views

How can I find then next grid block in the grid by direction?

...
1
vote
1answer
16 views

Why the text in the ui texts values are all the same 9,9?

At the top : public List<Text> texts = new List<Text>(); Than when creating a grid : ...
0
votes
0answers
17 views

Cinemachine camera not working in Photon multiplayer system in Unity

I am fairly new to the whole multiplayer game mechanics, but I made a simple car controller and added Cinemachine camera as a child to the car and then made it into a prefab, and I instantiate the car ...
1
vote
1answer
35 views

How an I find grid outer square positions by formula by script?

I mean automatic to find the outer grid square : ...
0
votes
1answer
57 views

How can I rotate my player towards a target without rotating the player to face the target?

In my code I play animation that make the player walking backward. Once the player is walking backward I want it to reach a target but not to be facing the target but to keep walking backward to the ...
0
votes
0answers
10 views

How do I keep root motion intact while changing Rig to Humanoid?

I have an animation with root motion. Here is how it moves: When I change the Rig from "Generic" to "Humanoid", it loses the root motion and instead walks in-place: How do I keep ...
0
votes
0answers
12 views

Unity TextMeshPro input text selection highlights programmatically

Is there a way to set the TMPro input text selection highlights programmatically (?) Here are a few things I have tried. Tried using .caretPosition and ...
0
votes
0answers
6 views

Weird anomaly with animator controller during testing

When running the game in the editor, my characters speed is not what the animator is set for. The speed is set at 2 at runtime but it moves considerably faster. Upon looking at the animator parameters ...
0
votes
1answer
22 views

Unity Build Automation

My current project has some editor scripts that I run just prior to run/build, which dynamically creates some game objects in my main scene based on configuration. I don't want these objects to ...
1
vote
1answer
26 views

What unity version should I install from the list? [closed]

The problem is that all my projects are in unity editor 2019 version and if I switch to a newer version I'm afraid it will start asking me for api changes and other changes that it will make to my ...
0
votes
2answers
33 views

How do I load scene content but not show it until later?

In my game, I have A start up scene that has a 1 script. This script loads The inventory scene The first level I don't want to show the inventory scene, I just want to pre-load it. Therefore I have ...
1
vote
1answer
28 views

How to find names of variables on Unity components?

I’m trying to make a Distance Joint in Unity 2D. I have it set up and it works properly in the game. However, when I go to set the ‘Connected Rigid Body’ field through code, I can’t figure out what ...
0
votes
0answers
24 views

Build crashing on macOS (works on windows)

I'm currently working on porting a windows game to macOS and it was going smoothly so far, but I got to a point where the build always crashes at one specific area in the game. There was never such an ...
0
votes
1answer
47 views

UI detects different resolution after second app launch

I'm encountering the strange behaviour that my UI (canvas with some buttons) is looking differently after the second launch on mobile. Restart of the phone does not help. This does not happen in play ...
0
votes
1answer
29 views

Unity Light Bugs in Android

I was testing my game, so I made a build to test it on my phone. I noticed that when I play in an android build, it is so darker than when I play in the editor or in a PC build. It looks like this in ...
0
votes
2answers
35 views

Use Buttons based on Key Presses instead of Mouse Click

I have a UI button. I want a function to be called whenever I press a specific key on my keyboard while my mouse is hovering over the button. I want to make something similar to UI in Ark SE where you ...
0
votes
0answers
22 views

Blending / Lerping between textures in a Unity CG Shader

I can lerp between colors just fine, but lerping between textures just doesn't seem to work. What am I doing wrong? Here's my code: ...
0
votes
0answers
64 views

How to make a shadow-casting day/night system in 2D URP?

I am trying to achieve a day/night lighting system similar to the game RimWorld. Short preview of what I want can be seen here: https://giphy.com/gifs/VgzcwtjueP7BrYSrXe Instead of using Global Light ...
1
vote
0answers
23 views

Why do my textures make randomly colored gaps?

So in unity, I use a palette to paint a texture, but they create randomly colored gaps like this: Why is this? Thank you in advance!
0
votes
0answers
36 views

HUGE 2D worlds in Unity (like spaceflight simulator)

I am a beginner in the field of game development and I am having some doubts regarding some stuff... I am trying to build a 2D space-rocket-orbit game like the Spaceflight Simulator and I'm not able ...
0
votes
2answers
53 views

Optimal implementation for effects in a card game

I am working on a card game in Unity and want to implement a system where I can create card effects that happen when certain events are triggered. The events could be anything from when a card is ...
2
votes
1answer
71 views

Making a billboard shader in Unity

I followed this guy's tutorial on making a billboard shader, and it works great, except if you are billboarding things that are tall, like a tree, it looks weird, to put it simply. When the camera's ...
1
vote
0answers
21 views

How to use animation curves to ease in out?

The script is attached to the transform that moves to target : ...
0
votes
0answers
12 views

How to create a aimLine in a pool game on unity2d?

I want to design a Aim Line for my player in unity2d. The game is split screen so what I basically want is that whenever its my player turn I want my player which is a ball to cast a raycast like you ...
1
vote
0answers
31 views

Why does Lerp not reach target if setting rb.position, but setting rb.transform.position works?

I don't understand the logic here. I have the following script which makes a player jump towards a target: ...
-1
votes
1answer
37 views

Mac unity not working (error message)

Upon opening a new project or template the unity launcher dies and shows the error message: ...
1
vote
0answers
16 views

Root Motion animation clipping through Rigidbody objects? (Unity 3D)

I am trying to program a climbing system. Player has rigidbody, ledge has rigidbody. Both also have Colliders, and the Player animator is set to use Root Motion. When Player grabs ledge and climbs up ...
1
vote
0answers
23 views

Checking if a base class type is of child class and accessing properties [closed]

I'm working on an inventory system similar to the Resident Evil games for a game jam. I wanted to practice using a little bit of inheritance, as well as ...
1
vote
1answer
62 views

Scenes do not stop showing "(is loading)"

I want to rebuild the RE4 game behaviour. In RE4, the inventory screen is a scene of its own. In Unity, the scenes which are loaded additively inherit the skybox / lights from the first scene loaded. ...
1
vote
0answers
17 views

Unity XR: Get boundary world position

I'm trying to create something simular to "Everest VR"'s "Stand on the footprint" system. The way it works is the game get's the XR boundary, places a footprints texture in the ...
0
votes
0answers
25 views

Problem with rotation to normal for FPP character controller

I want to create a first person perspective character controller that allows for walking on walls and ceiling by transitioning with a slope (kinda like the anti-virus levels in Rachet & Clank: ...
1
vote
0answers
36 views

When should I start the SlowDown coroutine?

The SpeedUp coroutine is working fine as I wanted. The transform starts moving down slowly falling down a bit then start rolling on the terrain. While rolling on the terrain the player starts walking ...
0
votes
1answer
32 views

package-lock.json file for in Unity?

Since I've been asked to reformat my question, here it is : Under Unity 2020 and behond... 2020.1.12f1 to be precise. I think that my package package-lock.json is corrupted, and block the fabrication ...
1
vote
0answers
23 views

How can I clamp rotation?

...
0
votes
1answer
27 views

How do I make animation positions relative?

I have a "reload gun animation". Currently, this animation makes the character move from its current position to position (0, 0, 0). This doesn't make sense. What you could I check to make ...
0
votes
1answer
19 views

How can I make the objToRotate speed to rotate depending on the target moving speed?

The player has these components: Animator, Rigidbody, Capsule Collider, Third Person Character (Script), Third Person User Control (Script), and the MyLookAT script. The problem is if I drag the cube ...
0
votes
1answer
10 views

Unity equivalent of GKAgent

Does Unity have an equivalent to GKAgent in Apples GamePlayKit to define agents, goals and behaviours out of the box? Would this be the unity AI system? Or more likely a 3rd party aaset? Thanks
0
votes
1answer
46 views

Two players using touch control simultaneously

I am working on a game like soccer star and I made a controller using YouTube and stuff. I added two players in the same scene and put this script on them. But when I play with player 1, then player 2 ...
0
votes
0answers
40 views

How many Sprite Atlases should be used?

I am using Sprite Atlases in my game to fix a bug with gaps between tiles as a result of oversampling, and I started wondering how the atlases should be used. What I'm asking here is whether I should ...
1
vote
0answers
81 views

How to make Enemy Wander in 2d topdown unity

I'm making a top down shooter in unity. The enemy AI travels straight to the middle before actually wandering when I put in the code. What should I do to fix that? (I'm using unity 2019.4.28f1 if that ...
2
votes
1answer
74 views

How do I guarantee that important one-time events in my UDP network protocol get received?

I'm creating an online arena game server (moba) that players can play together. 2v2 or 3v3. The game is similar to Battlerite. I chose client/server architecture with deterministic server that tells ...

1
3 4
5
6 7
290