All Questions
Tagged with c# unity-game-engine
43,298
questions
1
vote
1
answer
37
views
Having trouble centering a Gizmo in Unity's editor with an Isometric Grid where Z axis serves as Y axis
I'm trying to make the boxes in OnDrawGizmos() center isometrically within each tile. As you can see, I want to know the coordinates of each tile and always have them displayed in the editor. As you ...
0
votes
1
answer
31
views
Read json dictionary with multiple sub keys into unity c# script
I am trying to get my data from a json file into unity with a c# script. The goal is to move all players at the same time based on positional data, which i already have. I need to group the ...
3
votes
0
answers
26
views
Make a Texture3D writeable on the GPU in Unity
I have a Texture3D that I've defined:
tex = new Texture3D(8, 8, 8, TextureFormat.RFloat, false);
for (int x = 0; x < 8; x++) {
for (int y = 0; y < 8; y++) {
for (int z = 0; z < 8;...
0
votes
1
answer
27
views
Player is jittering when colliding with a wall
When I move against the wall, the player starts jittering.
using UnityEngine;
public class Movement2 : MonoBehaviour
{
[Header("Movement")]
public float Speed = 4f;
public float ...
0
votes
2
answers
40
views
Unity: Script won't delete 1 of the objects if 2 are colliding
I have this C# segment of code to make auto generated rooms, does anyone know why my code won't delete the clones of the object? I've tried a lot of methods, but I can't for the life of me get it to ...
0
votes
1
answer
23
views
Unity State Machine suddenly refuses to react to player input
I have been attempting to create a souls-like character controller in Unity, using this tutorial with the use a Finite State Machine using the following tutorial.
So far, everything has been working ...
0
votes
1
answer
27
views
The car does not turn when using the Wheel Collider
I'm trying to make a car controller using Wheel Collider. I have 4 wheels. And the parent object with rigidbody and box collider. Inside the parent object, I have four objects with Wheel Collider, as ...
0
votes
0
answers
19
views
What's going on with the lighting?
With the lighting on my HDRP stage, something is wrong with the lighting in some corners on the floor and on the walls.
I don't understand what this could be related to.
I also tried to place Light-...
0
votes
0
answers
57
views
When I edit UnityPackage and Export & Import, I get "The type or namespace name 'xxxxx' could not be found"
I'm a beginner with Unity.
I imported a UnityPackage distributed on GitHub into my scene.
There were no errors when I imported the UnityPackage distributed on GitHub.
After making a small edit to the ...
0
votes
1
answer
47
views
How can I make my enemy target a player who enters the scene?
So to explain a little further, I want an enemy from scene 2 to target a player that starts in scene 1. I already have a script for the damage and a AI script for the enemy, to chase the player, but I ...
0
votes
2
answers
35
views
How to create a list that spawns enemies that are placed into the list via the unity inspector
I am trying to create a list of enemies that can be spawned via trigger in unity. However I am running into an issue where my public GameObject enemy seen in the enemiesToSpawn class is called on ...
1
vote
0
answers
29
views
Weird movement using Mathf.LerpAngle Unity
I was making half 2d ,half 3d game. I wanted the up/down movement to be accompanied by a slight rotation in the direction the player is moving, for that I decided to use Mathf.LerpAngle method , ...
0
votes
0
answers
27
views
Unity Input System does not work with Steam opened
I'm making a multiplayer game in Unity and I'm using facepunch.Steamworks for the multiplayer. I made a quick virtual cursor to use in my lobby, so that I can move my cursor with controller. Problem ...
0
votes
0
answers
16
views
Why textMeshPro makes gc when called SetCharArray?
I am new about Unity. Consider the following function:
public void SetCharArray(char[] sourceText, int start, int length)
{
PopulateTextBackingArray(sourceText, start, length);
...
1
vote
0
answers
21
views
Unity Editor never releasing memory
I've been working on my unity project, and this happened:
So, my project has some Recursive functions, since it is about making a chess engine(rule-based AI). And when I test it out, I find my memory ...