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

How do I calculate orientation of GameObject in a custom coordinate system?

I am trying to build a custom coordinate system. To be more specific, the user chooses three points on screen to define the coordinate system. The first one is the origin, the second one is used for ...
0
votes
0answers
25 views

Is it normal for the baking timer in Unity to increase?

I'm having an unusual reaction from trying to bake my scene for Occlusion Culling (the scene was starting to lag and I thought this would optimize it) and I wanted to ask for advice. What's happening:...
0
votes
0answers
16 views

Low resolution RenderTexture with gradients

I have a small RenderTexture that stretched on large object, so texels is near 0.3 of unit. Source for this texture has much more resolution and with gradients. If source little bit changes its ...
0
votes
0answers
41 views

What does 'unity curl error 35: Handshake failed. UnityTIs error code: 7' mean?

I'm using Occlusion Culling to optimize one of my game's scenes, as I've noticed it has started to lag quite a bit. I have done this only once before with another scene and it didn't take too long, ...
0
votes
1answer
28 views

How to directly change a vector3

I'm new to unity, and written code in general, but I haven't been able to change the value of a vector3. public Vector3 VARIABLE = (5f, 5f, 5f)
0
votes
1answer
21 views

Unity Tilemaps not Rendering as I move camera

As I move the main camera in my Unity game towards the left or right, the camera just stops rendering any of the tilemaps in the scene. Here, the camera is at x = 25.7, and the preview isn't showing ...
0
votes
0answers
12 views

Perhaps all the settings that apply to prefab apply to terrain.terrainData settings?

I have a brush widget in which the following settings: Can I apply all these settings to terrain.terrainData? Common settings terrainData and ...
0
votes
1answer
12 views

Referencing Tilemap inside Grid Prefab

I have a prefab of a grid which contains 3 different tilemaps: Main, Foreground, & Background I want to reference the tilemaps inside a script of the prefab but can't figure out how to do that.....
0
votes
0answers
14 views

How to handle touch when keyboard is open in unity?

I am trying to make a chat based game in Android using Unity. When my TouchScreenKeyboard is open and I try to click on submit button, it only closes keyboard and ...
0
votes
0answers
13 views

Place a GameObject Parallel to a Point on a Sphere [duplicate]

I'm trying to place an object parallel to a sphere in Unity3D. With the following code from here: ...
1
vote
2answers
64 views

How can I improve the performance of my A* pathfinding code?

I'm currently working on implementing A* pathfinding into a little project of mine. My ideal goal is that my game should be able to handle about 1000+ objects without any noticable impact on ...
0
votes
1answer
23 views

When to destroy Google AdMob InterstitialAd object?

There are a few answers on this question but they don't give a satisfactory answer. I am using a singleton AdManager class that persists throughout the game. I am not sure if I should destroy the ...
0
votes
1answer
22 views

Storing a List to PlayerPrefs Not Working

I have a test database of 37 records and I have stored each column into a list and I am storing each record into PlayerPrefs. ...
0
votes
0answers
22 views

Unity3D behaves differently in scene and game view

We are having AI being able to shoot. Everything works fine when having them play in Scene view, but when going into Game view the position they are shooting from is different. Does anyone know what ...
0
votes
0answers
15 views

Calling a method using Game Event scriptable object

I'm trying to use a scriptable object Game Event and Game Event Listener to call keep dependencies low and things more modular. How it's formatted right now is I'm using a UnityEvent startScene, ...
0
votes
0answers
29 views

Unity wrong keyboard layout in playmode

I am developping on unity with differents platform (Windows at home and Linux at work). I have azerty keyboards on both. When I am on Linux and test my game in playmode, the keyboard layout is like I ...
2
votes
2answers
145 views

HIGH energy consumption in Empty Scene Unity iOS

I am struggling from quite long about this issue where I am having High Energy Impact in Unity 2019.2.16f1 on iOS platform and it doesn't matter which device I am using. It occurs on iPhone6 to ...
0
votes
0answers
24 views

Workflow to have character look like : Tokyo ghoul:re [Call to exist]

I am looking into a lot of different software and now that I got my head around most of them, I was asking mysel if someone knew what has been used to create the characters in the game I mentionned. ...
-1
votes
1answer
24 views

i was watching tutorial of endless runner game like subway surfers but when i tries to spawn tiles it is not spawning at the correct position

Hello every one i m new here and also in game development. i was watching tutorial of endless runner game like subway surfers but when i tries to spawn tiles it is not spawning at the correct position....
0
votes
0answers
63 views

Check which Player got highest Number from Dice

I am doing a Ludo Game and currently i need to check which Player got the Highest Number from the Dice and the player which has the highest number goes on the starting position. Currently i created ...
0
votes
0answers
20 views

How to find and modify specific entity or gameobject in Hybrid ECS?

I am rotating 3 cubes in Unity with Hybrid ECS and the code goes like this : ...
1
vote
0answers
23 views

Why is unity's RaycastHit2D contact point is slightly off

This is a small test I made, basically I have a simple BoxCollider2D that has the top surface aligned with the x axis. It's just a ...
0
votes
1answer
28 views

Word Wrap in Editor Console

I'm working as an educator - I am wondering is there any way to wrap the text of lines output from the Unity editor console?... Thanks!
0
votes
0answers
27 views

How To Architect My Game To Keep the Same Scene Loaded

My Unity game has a large planet GameObject that serves as the map. I want to keep this planet loaded, but still create different levels where enemies and the player are spawned at different locations ...
0
votes
0answers
24 views

Unexpected changes in Ai population

I've been trying to do my first evolution script. I want my population to learn to walk in 3d space. I am getting issues with the movements and the mutation. In my script, they evolve based on certain ...
0
votes
0answers
15 views

Stencil test doesn't work at all in Unity when I am using a custom shader

I am using Unity 2019.3 and I have a custom shader A which contains the code Stencil{ Ref 5 Comp Equal Pass Keep } And the other custom shader B ...
3
votes
2answers
180 views

Moving large group of units 1 by 1 takes too long, how can I improve this?

I use use Unity's own NavMesh/AI system and I think it works pretty well. The only problem I have is that when I move large groups of units, they will find a path one by one, but it takes a really ...
1
vote
0answers
30 views

HDR mode in windows makes build version of Unity game look washed out

I've got a 2D Unity game I've been working on. The development computer is hooked up to a TV that supports HDR. If I turn on the "Play HDR Games and Apps" switch in windows then run the build version ...
1
vote
0answers
14 views

Unity: How to make input field respond to only double taps in Android?

I am using Unity in my Android project. There are input fields in my app. As soon as I click on the field the keyboard pops up. I want the keyboard to only show up when there is a double-tap on the ...
0
votes
1answer
20 views

Unity Dropdown Stays Stuck Open

As can be seen in the following video: https://youtu.be/zb3uMUqub00 The dropdown stays stuck open when Unity launches the game. This happens even with a non-modified dropdown that is plopped as a ...
0
votes
0answers
25 views

FSM - Transitioning to another state

I am using a Finite State Machine for my character who has the ability to change into various forms (Wolf, bird, ect). The character changing to each state is not instantaneous and has a transition ...
0
votes
0answers
7 views

Why won't my audio listener activate on awake when ported to WebGL? [Unity 3D]

When I poked around the documentation for WebGL builds in Unity, I read that WebGL places limitations on some of the audio features typically allowed in Unity. It does however confirm that the ...
0
votes
1answer
29 views

PlayerPrefs.SetInt Stops code below from running

This is the code... ...
0
votes
1answer
44 views

Disabled script works anyway

I have a simple code that will be enabled when I kick, so I disable it right away but even though it is disabled, it works somehow. can it be because of his parent or something else I dont know of? <...
0
votes
1answer
43 views

Where's Anti-Aliasing in LWRP?

In Unity 2019.2 -LWRP (lightweight render pipeline project) the default Game Output(Quality = High) is rendering with jaggies. Inorder to get a clear render ,while looking for the Anti-Aliasing ...
0
votes
0answers
68 views

How to make parabolic jump from a to b to c and so on?

I want to make a game similar to "Dancing HOP: Tiles Ball EDM Rush" I am trying to make an object jump from point a(z=0) to b(z=10) to c(z=20) and so on, keeping the z axis distance constant for each ...
0
votes
3answers
61 views

How to set the Y position of Camera to another object's y position, but only once, not continuously?

Essentially, I want to set the camera's Y position to another GameObject's Y position, but I only want to do this one. If you do ...
2
votes
1answer
34 views

Reducing noise from joystick at small deflections

I have placed in my level a cube, which is my player, and a camera, which will follow the player. I'm defining a direction A from camera to player and another B perpendicular to this one. So I get ...
0
votes
0answers
8 views

Detecting air tap down and up

Is it possible to separately detect the finger close and open gestures (air tap "down" and "up") with Unity (2019) for the Hololens, without using MRTK (it introduces too many portability issues in ...
1
vote
1answer
19 views

Unintended window opening when pressing Unity's “Submit” button

I've been working on a top down 2D game for a while now, and yesterday I found a strange bug that I just can't explain to myself whatsoever. I have a loot window for looting enemies, as well as a ...
0
votes
0answers
22 views

OnPointerDown / OnPointerUp aren't working in world-space canvases

I'm working on a project where I have a main UI (Screen Space - Overlay canvas) and various game objects that have little popups above them (World Space canvas) that the player should be able to click ...
0
votes
0answers
32 views

Grid movement of game units

I am trying to achieve a grid movement for a character and enemies. This is what I have so far. ...
-1
votes
1answer
43 views

How do I detect input from the left or right arrow-keys in C#?

I'm using the line of code if (Input.GetKey("left")), but it obviously didn't register the input of the arrow key. How can I detect arrow keys like this? My code ...
0
votes
1answer
19 views

Dynamically added gameobject didn't show on canvas

I have a canvas with a Scroll View in it. When I manually add a prefab under the Content, it showed up nicely. But when I add ...
0
votes
0answers
17 views

Enemy Indicator shows both front and back

I made a simple enemy indicator which show image over the game object which look like this: You can see that red exclamation mark is over the cube. Note that Canvas is Space Screen Camera, so I had ...
0
votes
1answer
18 views
1
vote
0answers
44 views

Can I use trilinear filtering for my sprites, but keep their outlines unfiltered?

Suppose that I have two images of equal size. They both contain a square: https://i.stack.imgur.com/BI62X.png https://i.stack.imgur.com/Nev5Z.png When overlapped, both squares will appear next to ...
0
votes
1answer
16 views

Unity3D in WebGL the Player doesn't have animations

I using Unity 2019.2.14f1 to create a simple 3D game. I want to build the project for WebGL, but, even though the player has animations on Unity, in the web the Player doesn't have animations even ...
0
votes
1answer
44 views

Unity getting Input from UI

So I'm trying to get a script of mine to pass information to another static class being used for saving files as I've been told I wouldn't want that script to be instantiated. So I used a separate ...
1
vote
3answers
61 views

How to store information into the tile?

I have made a map via TilePallete tool. Now I want to store information in certain tile. How I can do this? ForEx: I'm hittin a certain tile and I need it to have info about health remaining. For ...