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

Navmesh agents trying to go to destroyed objects

I am still working on the RTS and have added a system that allows enemies to randomly wander. However, when multiple enemies fight one of my units, they will just clump up Afterwords instead of going ...
0 votes
1 answer
88 views

How do I calculate the direction of an object relative to the another object's view

Here is a diagram of what I'm looking for: I am trying to find the math solution to determine where that smaller circle is relative to the bigger circle's view. I thought that the easiest way would ...
  • 3
0 votes
0 answers
22 views

Find points on circumference similar to an orbit entry point for a spacecraft [duplicate]

I'm trying to find the point coordinates on the edge of a circle like this: I know: The coordinates of Point A The coordinates of the centre of the circle (Point B) The radius of the circle I've ...
  • 101
0 votes
1 answer
38 views

How to emulate the look of loading ZX Spectrum title screens in Unity

I am looking to replicate the style of screen loading as seen on the ZX Spectrum in Unity. Not the stripes of colors in the background. Just the title image loading. Specifically the way it looks in ...
0 votes
0 answers
91 views

Trigger Custom Event node in Unity Visual Scripting causing ArgumentOutOfRangeException error

I am using a Trigger Custom Events node in Unity Visual Scripting. It usually works but around 5% of the time... I get an error that says: << ArgumentOutOfRangeException: Index was out of range....
  • 253
1 vote
1 answer
84 views

How To Calculate The Correct Sprite Dimensions?

I am creating a 2.5D game similar to Paper Mario. I want the sprites that I import to Unity to be the perfect dimensions so that quality is not affected by the camera's position. If I'm understanding ...
0 votes
0 answers
53 views

Unity - Models suddenly stuck in poses In-Editor and 3D Animations messed up across project

Please Note: I'm having trouble placing pictures here, but I have a thread on the Unity Forums of this issue with images and additional video. Please refer: https://forum.unity.com/threads/models-...
  • 189
0 votes
1 answer
77 views

How to reconnect a client to a match (not the server)

In a multiplayer client-server Unity project using Mirror networking, I have a matchmaking system where the server matches two players and gives them a MatchID. The ...
0 votes
1 answer
58 views

Does Raycast called from Update execute on next FixedUpdate?

I've been searching through the Unity docs (https://docs.unity3d.com/ScriptReference/Physics.Raycast.html), but no matter where I look, I couldn't find exact behaviour of Physics.Raycast() method. I'...
0 votes
1 answer
23 views

How to read Unity Ads initialization code structure? [closed]

It is my first time integrating Unity ads into my game and my first time encountering the sample code below with the usage of "?" and ":" and wanted to ask how to read the line of ...
0 votes
1 answer
147 views

Sprite becomes blurry or jagged when camera zooms out

My game uses 2D sprites in a 3D environment, and I'm really struggling with my sprites' quality. I have high resolution vector art with clean linework created for my sprite. I'm exporting it as a .PNG ...
2 votes
0 answers
75 views

What is meant by Blender's "Minimum" twist method/how do I correctly calculate bezier curve twists?

I'm working on a bezier curve implementation in Unity. Until recently, I had no need for roll (the objects that followed the curve always stood upright) but I've since added a roll value to each ...
0 votes
2 answers
76 views

Determine which cannons on a ship can hit a target [closed]

I have a ship that will shoot targets, but cannons on the right side should never try to shot at targets on the left side of the ship. Thus I have created sectors using the ...
0 votes
0 answers
40 views

Circle color rotate minigame match problem

I am creating a minigame that involves rotating colored circles so that the colors match relative to the central circle which is fixed. I was thinking of checking with colliders that the two points at ...
  • 1
0 votes
2 answers
71 views

How can I make the hue of a material change over time?

I'm working on a small psychedelic-style game that needs to be done in Unity, with which I have no prior experience. I'd like to achieve an effect where the material of my objects can change colors ...
0 votes
1 answer
56 views

How to show orientation on an image minimap in Unity

Initial Question: I'm trying to create a minimap for my game in Unity. It consists of a 2D image sprite within a mask. I've got the rotation and the movement within the mask down, but the only problem ...
  • 1
0 votes
0 answers
58 views

Unity top down character movement animation goes sideways

I am struggling with the animation handling for my top down character movement. The game is a 3D top down game. The character is always facing in the same direction as the pointer and I have ...
1 vote
1 answer
73 views

How do I determine if a given grid coordinate is fully within a triangle?

I'm using Unity's Grid system, and I'm drawing triangles on the grid. Each triangle is recorded as a Vector2Int origin point and a ...
0 votes
1 answer
41 views

Setting target framerate changes animation speed in editor, while Time.deltaTime stays the same

I have few animations that work similar to this: ...
0 votes
0 answers
42 views

Rounded Line Shader

I am trying to achieve a rounded Line where Line will go through point A to point B with GLSL. I am able to do it on Shader Graph however I don't want to create my project while using Universal Render ...
  • 3
0 votes
0 answers
30 views

Monitor all outgoing requests from a mobile app

How to monitor all outgoing requests sent by the app and any of the installed packages, including trackers? For example, a Firebase Analytics SDK collects various data about the app users and their ...
0 votes
1 answer
99 views

Where should I put a JSON file to be readable in a Unity build?

I have a file which is created manually. In what folder should I put it so I can read it in a build? For example Application.dataPath in editor reads the file from ...
  • 133
0 votes
0 answers
106 views

How do I reset the game object movement after I setActive the object to false? (ObjectPool problem)

This is all from objectpooling. Instead of deleting it, it said to set the gameobject to false. The problem is, it didn't reset when it came back SetActive(true). What should I do? this is the script ...
0 votes
1 answer
52 views

Compute the difference between two vector3 and iterate with the difference in mathematically

I have two eularAngle vector3 A , and vector3 B; I want to rotate the vector3 A rotate to vector3 B by 10 small steps; ...
0 votes
0 answers
32 views

Need help refactoring my code into a functional state machine

I'm currently working on the PlayerController for my 2D Fighting Game at the moment Here's my code: ...
3 votes
1 answer
261 views

How can I make a crafting system in Unity?

I'm trying to make an crafting system in Unity. The problem is, I don't really know how to finish it. I already have the inventory system, (which I made using this tutorial: HOW TO MAKE AN INVENTORY ...
  • 33
0 votes
1 answer
86 views

Compute the difference between two quaternions and iterate with the difference

I would like to solve this with quaternions: A - B = C for(int i = 0; i < 10 ; i ++){ B += C/10 }; I want to get the difference (C) between two quaternions ...
1 vote
1 answer
110 views

Check if point is within Unity NavMeshSurface walkable area

I am using the NavMeshSurface component in Unity to generate a navmesh of walkable areas in a procedurally generated level. I am working on some basic behavior to use with a NavMeshAgent. I want to ...
0 votes
1 answer
44 views

Scalable way to have interaction button place item on campfire

I have been wondering how I can place a bowl on a campfire in Unity using C#, similar to how it is done on Green Hell. I currently have an inventory system set up where you can equip the item in your ...
0 votes
1 answer
71 views

OBI Rope, Create a curve from list of Vector3 points

I am using a Unity Plugin Obi Rope to create rope-based mechanics. I am working on creating an obi rope curve through code and rendering rope on that curve. I am stuck at the moment where I can spawn ...
0 votes
0 answers
53 views

OnPostprocessBuild build project path does not exist

I am trying to copy some files into the build directory after completing a build, but the path provided as an argument to OnPostProcessBuild does not exist. ...
1 vote
1 answer
57 views

Changing sound pitch in sync with airplane propeller rotation speed

I'm trying to synchronize a rotating propeller with a engine sound by changing the sound's pitch. I have a script attached to an airplane's propeller which, after the game starts, causes it to ...
1 vote
1 answer
74 views

Holding "Shift" to lock mouse movements to a straight line?

I'm making a little program that's a bit like paint but instead of filling in pixels, it drops a block on mousebutton(0). I'm now trying to add a straight line ...
0 votes
1 answer
138 views

Fetching IAP localized price in Unity

How can I obtain localized price of products to show on my purchase page?
0 votes
1 answer
35 views

How do I take a scene-object popup window, and use instances of a prefab button to initiate it?

I have a button that invokes a modal window (a market transaction). Using the inspector onclick, I have successfully setup so that 1 of the 9 buttons will pop the ...
  • 130
0 votes
1 answer
182 views

Duplicate class errors when building app larger than 150mb with Android App Bundles

I have been trying to get Asset Bundles to work since my app is larger than 150MB, but the Google -> Build Android App Bundle... step keeps failing on me. I am ...
  • 355
0 votes
1 answer
83 views

What's "isMatchingTarget" in Unity?

I came across this line of code below. What the boolean "isMatchingTarget" is used for? ...
  • 53
0 votes
0 answers
133 views

UnityEngine.AddressableAssets.InvalidKeyException

Unity version 2020.3.20f1. I am getting this error in the console. The game is working fine in Unity but not in the apk. In apk the scene is loading finely but throwing this error and the characters ...
3 votes
1 answer
140 views

How can I move my package folders into another folder to clean up Assets?

I've seen a couple different answers or weird workarounds to this topic: Package folders usually just go straight into the Assets folder, pretty much turning everything into a huge mess. Here's a ...
  • 133
0 votes
1 answer
113 views

How does Unity's FromToRotation work? A major part of its behavior seems undocumented

All Unity's documentation states about what FromToRotation does is: Creates a rotation which rotates from fromDirection to toDirection. This seems to leave a ...
1 vote
1 answer
82 views

Sprite created with RenderTexture and ReadPixels() has multiplied colors

I'm working on a character generator that creates thumbnail sprites for each character. I'm using a separate camera that renders to a RenderTexture, which is used ...
0 votes
0 answers
30 views

Alternative to CharacterController

I am really enjoying the use of charactercontroller, but it being limited by a y-axis aligned collider is a real annoying limitation when I am using a 'character' with a very different shape (like a ...
  • 802
0 votes
0 answers
39 views

Blend different size textures in Shader Graph

Say I've got a character model where part of the face has two UV maps: one's mapped to the generic body texture, the other covers a small area on the face to allow for a highly detailed tattoo. I want ...
-1 votes
1 answer
54 views

Does Screen.orientation not work in simulator?

I use the Screen.orientation property to reposition my UI when the screen is rotated. But when I rotate the simulator to left or right, ...
0 votes
0 answers
30 views

Desynchronizing MonoBehavior's "Update" from the overall app or UI Toolkit graphic output rendering in Unity?

Is it possible to desynchronize Application.targetFrameRate and Monobehavior's Update() from the graphics output rendering rate ...
  • 439
0 votes
1 answer
39 views

τ = r × F, In unity3d/PhysX how do we define r?

How does PhysX define/calculate the distance from the center of mass where we apply the force to produce a torque?
0 votes
0 answers
40 views

Udon teleport player in one direction

I am trying to teleport the player between floors, but I want to preserve their X and Z position as well as their rotation. This way they are teleported between floors seamlessly. The current code ...
  • 101
0 votes
1 answer
54 views

Model is oriented correctly in the Unity asset browser but flips 180 degrees when added to the scene?

I have modeled two pinball flippers in Houdini. I exported them as OBJ files and imported them into Unity 2021.3. They look correct in the asset view: They also look correct when I open them with the ...
  • 315
0 votes
0 answers
20 views

unity instanced shader can't get quads to look at camera

i'm almost using this code exactly: https://docs.unity3d.com/ScriptReference/Graphics.DrawMeshInstancedIndirect.html the second shader "Instanced/InstancedShader". i've been trying to ...
0 votes
1 answer
46 views

Is it possible to mark a Unity prefab variant as deprecated?

I'm building a game at the moment and a classic issue has come up, of having a complicated prefab variant in use, which happens to have a fundamental problem in its design and needs to be replaced. ...

1
3 4
5
6 7
311