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

How to define tile size for 2d tilemap in Unity

I am absolutely new to Unity. Now I am developing 2D RPG gameplay in 3D project. So my goal is to let player move only on a fixed road. There is an image of a fixed map, so I am going to use this as a ...
0
votes
2answers
45 views

How to make a singleton "game manager" object/class that only loads once and can be accessed from any scene?

I would like to have a single "Game Manager" game object or class that contains numerous parameters and tweens or other functions that would be necessary to access throughout my app across ...
0
votes
0answers
20 views

What are the tradeoffs I should consider when choosing how to track whether a GameObject is out of bounds? (Unity 3D)

The obvious ways are to either: OnTriggerExit for a box collider which wraps the stage bounds OnTriggerEnter for 6 flat box colliders surrounding the stage I suppose, to start, 6 flat boundaries ...
0
votes
0answers
28 views

Unity3d - Tile-based "Slippy" map rendered on a sphere (earth)

Scenario I'm creating a spherical version of a slippy map using osm tiles and my luck has been limited thus far. I'm starting to think my strategy has lead me astray and that I need to start from ...
0
votes
1answer
55 views

I'm still not sure why the reverse state is not working?

The goal is to be able to change direction(reverse or forward) at runtime in real time without waiting the transform to reach the next waypoint first but at real time to change the direction/s. ...
-1
votes
0answers
22 views

HelloThis is error I getArgumentException:Objectoftype'UnityEngine.Objectcannot be convertedto typ'UnityEngine.Collider'.System.RuntimeType.CheckValue [closed]

using System.Collections; using System.Collections.Generic; using UnityEngine; public class NeeeeeeeeeewGather : MonoBehaviour { ...
0
votes
1answer
35 views

How to get / set value of a float2 field in a custom editor script?

I wrote this code: ...
0
votes
0answers
29 views

Your Android App Bundle is signed with the wrong key

I get this error when I try upload my Android app bundle (made with Unity) for release on Google Play Console: Your Android App Bundle is signed with the wrong key. Ensure that your App Bundle is ...
-1
votes
1answer
25 views

Creating custom editor fields based on presence of custom attribute

I'm creating a manager object that controls a bunch of other objects at once. I want to be able to restrict / expose parameters in the target object to the manager via a custom attribute. I have the ...
0
votes
0answers
8 views

How to create game server using Photon like SFS 2X

In SFS2X there is a user dashboard to upload the JAR file. The JAR file contains all the game logic. From Unity, I send a request to connect with the game server to play the game. How to do the same ...
0
votes
1answer
31 views

Getting XR Grabbable items networked with Unity

I'm trying to get XR Grabbable objects networked in Unity, with the networking framework Mirror. This should be a simple task as Mirror has a component called "NetworkTransform" that simply ...
4
votes
2answers
47 views

How to not cover up the Android/iOS top status bar (eg. with time, network/wifi icons) in mobile Unity app?

I am making an Android/iOS mobile app in Unity. Currently, when I build it and install it (for example from APK to Android) it loads completely full screen covering up the top phone status bar which ...
0
votes
0answers
25 views

Avoid clipping objects when looking at them close-up in the Scene view

I am making a game in Unity3D, but whenever I get about 5 meters close to an object, the camera acts like I am right by it and does not render part of the screen. Here is a screenshot: This is really ...
1
vote
2answers
25 views

How to have unity inspector variables modify each other bidirectionally and update in real time [duplicate]

Trying to make some inspector controls that both modify the same thing but in different ways, and I want them to both update when the other is edited. Won't bore with the details but there's a reason. ...
3
votes
1answer
68 views

How to protoype a multiplayer game whose fun comes from having lots of features

I've seen plenty of testimonies that to make a good game and not waste time, one should prototype early, quickly see if the core is fun as is, and not focus on graphics, menus, sound, secondary ...
-1
votes
0answers
29 views

College Project [closed]

I'm making a win scenario for a basic college project. I am trying to initialize some fireworks to shoot off when all checkpoints have been crossed. Error i'm receiving is CS0029 Cannot implicitly ...
-2
votes
1answer
24 views

Why I'm getting message in the editor console window , Look rotation viewing vector is zero?

Look rotation viewing vector is zero UnityEngine.Quaternion:LookRotation (UnityEngine.Vector3) Waypoints:Update () Why I'm getting this message and what should I do with it ? It's not a warning and ...
0
votes
2answers
45 views

What is the best way to make firetruck outriggers push firetruck up on specific corner

Unity3d Hello, I'm trying to recreate functionality of outriggers stabilizing a firetruck before the ladder is raised up. How would I go about making the downward force of the outriggers lift the ...
9
votes
1answer
3k views

How can I "zero out" velocity in an arbitrary direction?

I'm currently running into an issue with my character controller using physics-based movement of rigidbodies in Unity. Here's an illustration of the issue I'm facing: Basically, after a jump, my ...
0
votes
0answers
38 views

How can I draw gizmos only at runtime?

...
0
votes
0answers
32 views

When I tried upgrading my project to a newer version of unity, then downgrading it to the original one, it gave me 3 errors having to do with sprites

So I upgraded my project to a newer version of unity because some dude told me that i could export my game (i couldn't). So I downgraded my project to my original editor version and it gave me these 3 ...
0
votes
0answers
16 views

Efficient dynamically modifiable terrain system [closed]

I want to create a nice terrain system for a mobile game, which I develop in Unity. The terrain needs to support dynamic modification at runtime, e.g. cutting out a block from the terrain when that ...
0
votes
0answers
15 views

Unity touch position infinity

When I try to get the touch#1/position [Touchscreen] I receive as value (Infinity, -Infinity) with the new input system of Unity3D My settings are Passthrough and Vector2 as expected value. The ...
-1
votes
1answer
34 views

How do I create a method that adds a new sprite to the game?

I want to have a script in my game that adds a card. I am using a Card class for all my cards, so I don't have to make a prefab for each card. Instead I can do ...
0
votes
0answers
31 views

How to snap an object to an axis in 3D?

I have a script that lets player move a Rigidbody in my game with a mouse, and I want some objects to snap to other objects' axis (let's say guide) when they are near. So when an object is close to ...
-1
votes
1answer
33 views

How To Avoid GetComponent on raycasts and collisions

GetComponent() is suggested to not be used so frequently because it can cause a performance impact. I'm working on a game that needs to check the components of ...
-1
votes
1answer
27 views

Bullet Fire stuck on loop

When i shoot my bullet the unity explosion prefab keeps playing I have a gun Script ...
0
votes
1answer
31 views

How to knock animated character backward when sword strikes wall

I was wondering how to make animation and physics interact. Specifically, I want to make it so when my character (rigidbody) plays a sword hit animation (swinging the sword in front of it), it makes ...
0
votes
0answers
6 views

Deserializing Unity Mixed mode into YAML

is there a way to deserialize .unity and ProjectSettings file in binary format down to yaml? I provide an example of one of such ...
0
votes
0answers
34 views

How can I implement procedural generation with an undetermined amount of types of terrain?

I'm trying to create a very modifiable game starting with terrain in the form of a tilemap. Any type of tile can be removed, modified, or created by the user. The problem is that I can't find a way to ...
-1
votes
0answers
20 views

Why is my if method not running? [closed]

I am trying to make wander code for my player and the part for it wandering and going around is working however the part that stops the wander and makes it go back into idle doesn't work. I tested it ...
0
votes
0answers
26 views

Photon PUN OnPlayerEnteredRoom not triggering

I'm very new to Photon, medium experience in Unity. I'm trying to implement a lobby where, once a player enters the room before the game starts, a player card pops up for them ie. just their picked ...
-1
votes
1answer
26 views

How to rotate my enemy so it scans the area?

Hi I am new to unity so I am not super familiar with methods. I am trying to make my enemy rotate left then right double the amount that it rotated and back to the middle like this: +10 degree, -20 ...
2
votes
1answer
902 views

Why is there only one variable displayed in the Inspector?

Using the following code, only one variable is shown in the inspector: [SerializeField] private GameObject _obj; This makes sense, since there is only one field. ...
-1
votes
1answer
28 views

Why does a public variable define a private one? [closed]

What is the point of such work with variables? public GameObject Obj => _obj; [SerializeField] private GameObject _obj; A private variable loses its privacy ...
-1
votes
0answers
13 views

Humanoid Rig force knee of my character to rotate, but it shouldn't be

Demonstration of the problem - video My export settings My Unity import settings Rig Settings Animation Settings
-1
votes
0answers
16 views

A method not getting called because of a NullRefrence exeption error [duplicate]

I am getting a nullrefrenceexception error from my main script where I try to run a method from another script and I get that error. I also get this warning: "You are trying to create a ...
0
votes
2answers
22 views

Humanoid rig breaks my animation

The humanoid rig behaves strangely with my animation from Blender. Here is a demo of the problem - video. Can anyone suggest what the problem might be?
0
votes
2answers
36 views

How to make windows that pick up what appears in the other

Basically there are 2 windows that you can drag and drop around the screen. Whatever appears in one window will also appear in the other. The two windows cannot go one over the other. This is a demo ...
-1
votes
0answers
55 views

Why does this work but this doesn't even though they are the same thing?

In my game I am trying to trigger the death animation but it doesn't work when I use anim.SetBool("isDead", true); however when I use ...
0
votes
1answer
27 views

Getting info about the script a [PropertyAttribute] is attached to in Unity

Is there a way to access info about the script that a PropertyAttribute is part of in Unity? In my case: getting the memberInfos of the script: ...
2
votes
1answer
57 views

Why is Unity using a Quaternion for rotation, but a Vector3 for angular velocity?

Unity uses quaternions for storing the rotation of rigid bodies, but vectors for the angular velocity. Why? I thought you'd use a quaternion instead of that vector also. I don't know much about ...
0
votes
0answers
16 views

Render mesh to texture via command buffer in Unity

So I'm rendering a mesh to a render texture for an outline effect. In the HDRP pipeline UnityObjectToClipPos doesn't seem to work because when I try to merge the ...
0
votes
0answers
13 views

How do I debug multi-touch for a Unity on Android platform?

I'm trying to implement multi-touch in my game but there are many bugs so far and I need a way to get info on all of the touches as the game is running. So far I haven't found any way to do this.
0
votes
0answers
13 views

Struggling to get layer collision to work without stopping movement

I currently have my player object set with a dynamic rigidbody and a box collider, and the object I want it to collide with just has a box collider. The player is on the Player layer, and the object ...
0
votes
0answers
12 views

Data not saving across scenes [duplicate]

I've been trying to save a player's score with PlayerPrefs, however every time i change scenes, the game simply stops tracking the score and doesn't even add score when told to, anyone has any idea of ...
0
votes
0answers
9 views

How do I pass a temporary render texture generated by a command buffer to a material?

I'm working on an outline effect for my game. I want to do the render buffer based methods since the outlines are imo of much higher quality. I can render the selected objects into the buffer as ...
0
votes
1answer
21 views

How do I change from virtual camera (e.g dolly track) to main camera?

I want to show a cinematic view of my scene and then be able to play it with the camera attached to my player. I have set up a dolly track and virtual camera and all works fine but I can't then play ...
1
vote
1answer
25 views

Callback to a dynamic value in GameObject.transform

I'm currently writing an InputManager using Unity's "new" input system. The InputManager receives all player input ...

1
2 3 4 5
294