We’re rewarding the question askers & reputations are being recalculated! Read more.

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
1answer
74 views

How can I simple use global or individual bool flag/s?

...
0
votes
0answers
32 views

Occasional lag-spikes in performance in heavily optimized game (profiler screenshots included)

So I've been working on a mobile-based platformer for a few years now. I've spent more than a year optimizing the game for mobile as much as I could. Almost every single one of my meshes are using ...
0
votes
3answers
51 views

How to run code selectively only when a specific trigger collider has been hit

I have 2 objects both with trigger colliders. The first object has only 1 trigger collider (imagine this to be a sword). The second object (a person) has multiple colliders. One is a non-trigger ...
0
votes
0answers
51 views

Why the doors lockstate is all the false?

The goal is to change the doors lock state in the editor mode and also in run time. It's not working either in run time or editor mode. The problem is in the HoriDoorManager in the Update. The method ...
-1
votes
0answers
52 views

Using two push buttons as an input to Unity from arduino

noob here So I am trying to use two push buttons from an Arduino Uno to move a character in Unity. Both buttons have to be pushed down for the character to move. Right now I have gotten the code to ...
0
votes
1answer
23 views

Unity ceiling light issues

I'm trying to get back into Unity and I've been playing around with lighting. I modelled a simple lightbulb in Maya and have been trying to create a hanging ceiling light but I'm struggling to get it ...
0
votes
1answer
16 views

Unable to edit tile sizes in unity

I'm trying to change the size of sprites in unity to fit the palette. Except there are no options to change multiple sprite sizes at once. But when I watched a youtube video on tilemaps and palettes, ...
0
votes
1answer
14 views

Unity Tile pallete isn't appearing in window tab

I'm trying to add a tile pallette to my scene in Unity. But when I go to Window - 2D there is no tile pallette option I'm using v2019.2.11f1 (Personal)
-1
votes
1answer
23 views

Unity Build Failed - Duplicate Class

I'm here struggling for hours to build my game (android) and 'Execution failed for task : checkReleaseDuplicateClasses' ...
0
votes
0answers
11 views

How to export Blender shape key drivers to Unity?

I created a character in Blender with about I am using drivers because the regular Blend shapes seemed (unless I was mistaken--?) to interfere with all of my animations. When I export the FBX to Unity ...
1
vote
1answer
63 views

How to receive a Knock Back when the player touched the enemy

I'm still new to C#, making my 2D game atm and my problem is how can I give my player a Knock Back when it touches the enemy. How to add it with this code? ...
0
votes
1answer
24 views

IConvertGameObjectToEntity interface on Unity ECS

Was working on ECS and following the tutorials by Mike Geig in Unite Copenhagen on YouTube(https://youtu.be/BNMrevfB6Q0), and understood that unity automatically converts transforms, mesh renderers ...
0
votes
1answer
23 views

Unity Screen.height / Screen.dpi is *not* equal to the screens height in real life

On mobile, I was planning on using Screen.dpi to work out the physical size of the screen and size controls accordingly. But this quick test on my Galaxy S5 proves that the numbers from Unity are ...
8
votes
4answers
5k views

Mechanics to keep mobs and environment alive without using tons of memory?

I'm working on a server for a little mobile MMORPG. This consists mainly of two important features: mobs and environment resources like trees, rocks etc. The world is randomly generated and each time ...
1
vote
1answer
73 views

Unity conversion of Gameobjects to ECS

I have not worked with ECS before, so I was following the tutorial by Unity's Mike Geig on Youtube to convert gameObjects to ECS from Unite Copenhagen, and this code does nothing, and there are no ...
1
vote
1answer
34 views

How to reference nameof private serialized field in unity custom inspector

I'm running into a problem that I think will seriously affect maintainability down the road, so I'd like to figure it out now before it becomes a problem. I've been starting to use private [...
0
votes
0answers
21 views

Error: Object destroyed

When I try to run my game I have an error like this: MissingRefferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it. Here is my script: ...
0
votes
0answers
8 views

Unity + Android setting application name in logcat output

I'm using Unity 2018.4.12f1 LTS and targeting Android. In ADM, in the logcat output, there is a column "Application Name" that always says "?". Is there a way to set the application name that ...
1
vote
0answers
11 views

Unity animation: How to reset pivot after 3D character somersaults?

I have this new character animation that I made in Blender. None of my other animations use Root Transform or anything fancy, and they work great. This new one is special though. The character jumps ...
0
votes
1answer
36 views

Unity Shader Blend like ugui Outline

Unity UGUI Outline it create fourfold vertexs, So I wirte shader to optimization ( vertex only create once ), And I want to Keep one pass . (one drawcall) There ...
0
votes
1answer
25 views

TMP Square Font

i'm trying to implement Chinese language to my app. But I'm seeing nothing but squares. I've tried to create from file and hex. They cant be added. For example, there are 3000 letters but only 17 is ...
0
votes
0answers
21 views

How to make progress bar in EditorWindow with Threading in Unity?

I need to make a progress bar in EditorWindow. To do this, I perform the function of calculations in threads: Thread thread = new Thread (_worker.Work); thread.Start (); The class itself emitting ...
-1
votes
1answer
42 views

problem changing texture from one to another

I have a problem that, when exceeding the maximum or minimum texture in the matrix, is giving this error, what can I do? IndexOutOfRangeException: Array index is out of range. ...
0
votes
1answer
25 views

Actual Sizes of An Image loaded with a Path

I have a method which selects an Image from device. I need to show this image to users. The codes below works fine, does what I need. ...
0
votes
1answer
59 views

Avoid players getting stuck by placing items in the same place

Let's assume a multiplayer game of two players. These two players have to place six elements at six different positions. The order or exact place does not matter. As the items are placed correctly, ...
0
votes
0answers
23 views

Rendering part of an equirectangular video on a plane

For a Unity project I have a 360 camera which produces an equirectangular video. I need to realize preview of this video for putting it on a plane. In most cases the part of the video to be drawn on ...
0
votes
0answers
20 views

Creating prefab trows issue:

From past couple of hours i trying to create new prefab out of my environment but it keep trowing error: Error: You are trying to replace or create a Prefab from the instance 'palmtree ...
0
votes
1answer
22 views

Unity app crashes when using unmodified custom Android manifest (didn't find class “UnityPlayerActivity”)

Note: I find/replaced my actual company name with 'companyname' below for anonymity, it's not the actual package name I am using. I have Unity 2018.4.11f1 LTS and the platform I'm having issues with ...
0
votes
0answers
17 views

How could I create those two meshes by creating procedural quads

I need to create 2 meshes procedurally and I don't know very well what order to give the vertices to show them correctly, is there any app/utility to help me establish those points? Images: Sapling: ...
0
votes
1answer
160 views

Can't open nor install 2D Sprite Editor through package manager

In unity 2019.2.10f1 Personal edition on Windows 10 I wish to edit a spritesheet through the built-in sprite editor. When I ...
0
votes
0answers
14 views

Unity3D: Rotating the head and an animation gets clashed

A rigged generic models head keeps rotating to follow the camera. When there is an animation like shaking the head, the head animates weirdly as compared to without rotation. Is there anyway to fix it?...
0
votes
1answer
34 views

Unity get reference of GameObject under another GameObject

I am trying to get reference of the object underneath my Player. I don't know if I am aproaching this correctly. Right now, I have a player simply put in the scene, like this: Then I am trying to ...
0
votes
1answer
41 views

Velocity and drag in unity

So I have an object that is bouncing around the screen randomly, physics still works on it so it will speed up or slow down depending on what it hit and when. To try to normalize the speed I want to ...
0
votes
0answers
25 views

Unity 3D Image Distortion

I'm trying to make a 3D tour for cardboard. I'm putting my 3d image inside a sphere with a shader but I've noticed this problem. And the middle of the image is looking kinda wavey and distorted.
0
votes
1answer
24 views

Unity List script field with +/- buttons in editor

I am using Unity 2018.4.11f1 LTS. I have a script with a public List<GameObject> field. In the property inspector, Unity provides a UI to this field where ...
0
votes
1answer
28 views

using #if UNITY_EDITOR && !UNITY_ANDROID greys out the code. (UNITY)

I'm trying to exclude part of my code when building(android) but keeping it while in the editor for testing purposes. Using #if UNITY_EDITOR only will result in this code getting build, but using #...
0
votes
0answers
13 views

Setting a 2D Polygonal Collider to Camera Size

I'm trying to resize a polygonal 2d collider to the size of the camera. Here's what I've got so far: ...
1
vote
3answers
201 views

Unity ball hitting paddle not reflecting right away

After the ball hits the paddle it continues for a frame or two in the physics, reflected direction, then my onCollisionEnter2D function runs and changes the ...
0
votes
0answers
27 views

Deleting verts form a mesh if inside a trigger/object in unity

I am the sole developer of a game called project serene, i have the basics of world generation, health,hunger,inventory, and building complete, but you don't have a way to deform the environment ...
0
votes
0answers
29 views

Concept design-pattern for industry simulation required

I am making a mobile game simulating industry. A brief high level description is below. A hub could be thought of as a base/city, within which there are rooms/buildings which determine what is ...
0
votes
1answer
33 views

Stuttering when using movetowards in a coroutine

I have the following problem with a WebGL project I'm working on: I have an object which I want to zoom out and move to a specific position at the same time, for this, I've created a coroutine which ...
0
votes
2answers
87 views

Unassigned reference exception when proceeding from scene to scene

So, I have built a script in unity in c# called parralax. It basically parallaxes two backgrounds and looks like this:- ...
0
votes
0answers
27 views

Fast route for utilizing images produced in python matplotlib (or within Julia) to be displayed in Unity?

I would like to use within Unity heatmaps produced with matplotlib invoked using python or julialang such as the heatmap shown in: Source: heatmap from matplot lib I can invoke python (or Julialang) ...
0
votes
0answers
65 views

How to exclude assets from main project build that are included in asset bundles?

I think I have some misunderstandings about Unity asset bundles. First as I searched I found nothing that lets builds asset bundle just for one label. As you know, Ynity builds separate bundles for ...
0
votes
1answer
57 views

Help with NPC following the player in a sidescroller

I'm a beginner with C# and am having a bit of trouble coding an NPC that follows the player in a 2D sidescroller. The player has two speeds, a walk and a sprint. I have a very basic companion follow ...
0
votes
0answers
10 views

Unity - controls working in the Editor, but not in the build

For some reasons my controls (Except the axis) are not working in my build. The weird thing is that they seem to work without a problem in the Editor. ...
0
votes
1answer
80 views

Dealing damage over multiple frames without damaging the same enemy twice

I am using Physics.Overlap to find which enemies are in my damage range. But dealing damage in only one frame is not what I want. Some attacks should be active for ...
0
votes
1answer
23 views

Unity Editor stops updating ScriptableObjects if I click away from them in editor

I'm trying to be better about structuring my code, and I think I'm doing it right. The issue I've got right now is I need to get joystick inputs, scale those values appropriately, and then use that ...
0
votes
0answers
20 views

Unity 3d Raycast from localspace to worldspace

I want a raycast direction not relative to the rotation, but what happens is that the raycast points to one place as if it was a transform.forward Why is the happening help ...
0
votes
0answers
21 views

Unity 3D - Materials are Stretching and Tiling doesn't Help

I am a programming student working with Unity 3D, version 2018.4.6f1 for this class. I wanted to add some materials to my wall, however, this results in a rather ugly result, because my walls are of ...