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

Is it possible to move Overlay Canvas away from (0,0,0) in the Scene View?

In our workflow we use a Screen Space - Overlay canvas for UI. The only problem with it is that you can't change it's position (...
user avatar
  • 2,492
0 votes
1 answer
15 views

bind mixamo bone to unity

I'm trying to bind the mixamo default bone in blender and then use it in unity. but it seen no match in unity? like a use auto rigging in mixamo website. is there a way to use mixamo default bone then ...
user avatar
0 votes
0 answers
9 views

Unity Webgl general Loader js

I am trying to write a general loader.js using this official guideline in unity webgl. I have followed these steps: Create a custom WebGL template by copying the contents of the /PlaybackEngines/...
user avatar
0 votes
0 answers
23 views

How to get Windows identifiers in Unity?

I'm trying to get an unique computer (Windows) id in Unity. I can get it in .net Framework using this code, that I found somewhere: ...
user avatar
0 votes
1 answer
28 views

Random value is chosen 2-3 times, then after that it's always 1

...
user avatar
0 votes
0 answers
9 views

Unity - One client can control all player objects in a multiplayer game (Netcode and Input System)

TL;DR Clients can control only their player objects with keyboard, but all players with gamepad (using Netcode for Game Objects, Unity Input System and a PS4 Controller) I am working on a multiplayer ...
user avatar
0 votes
0 answers
13 views

RayCastHit2D returning value only once, then stops

I am trying to do a check to make sure the player is not on a wall, so that he doesn't not continue jumping upwards when hitting it, as it returns him as being grounded. I am using a RayCast2D coming ...
user avatar
  • 25
1 vote
1 answer
58 views

Cloud based fog of war

I'm working on a Unity 3D game that requires fog of war. It is seen from above. I was looking for help and found this: (I dont know what game it is though) This would perfectly fit my needs but I don'...
user avatar
0 votes
0 answers
14 views

line renderer collision detection in 3D

I've been using the code down below to simulate a rope physics (based on this: Create Rope Bridge, String in Unity - Verlet Integration Part 2). Currently, it uses edge collider 2d to detect collision....
user avatar
0 votes
1 answer
59 views

How to create a 2d array in Unity using Visual Scripting?

Found some good tutorials on how to create 2-dimensional arrays in Unity: https://owlcation.com/stem/Using-Single-and-Multi-Dimensional-Arrays-in-C-and-Unity3D Anyone know if this is also supported in ...
user avatar
  • 101
0 votes
0 answers
20 views

How to determine for every wall in a 2D tilemap where's the "inside"?

I'm working on an ARPG, and I'd like to implement a "fading walls" system similar to Diablo II's. Let's say I have this tilemap, where Black tiles are walls, Brown tiles are floors, White ...
user avatar
  • 626
0 votes
1 answer
26 views

Pathfinding over network and local avoidance

I'm trying to build a little MOBA game (max 10 players) in Unity and i'm really stuck with the pathfinding / local avoidance. Here is what i'm doing when user click to move on the map: Client send a ...
user avatar
  • 307
0 votes
1 answer
26 views

Passing a string as argument to Unity Job System

I have a Job that needs to take some string from main thread and use it locally. Considering that the Job System cannot directly accept the string as an argument, is there any workaround to circumvent ...
user avatar
0 votes
0 answers
46 views

Issue with Goal Oriented Action Planning (GOAP) and multiple preconditions

So I am working on an AI for my game using GOAP. I've been researching it for the past few days and while implementing it on my own I've ran into a problem. Here is a diagram of what I am doing. The ...
user avatar
0 votes
0 answers
23 views

How to install packages from scoped registries on older versions of Unity?

I have a Unity project using v2018.2 (I cannot update it) I need a package (namely, keijiro's OscJack) which must be installed using a scoped registry Scoped registries don't seem to have been a thing ...
user avatar
  • 131
0 votes
1 answer
19 views

How to detect long press on object using Unity EnhancedTouch?

I want to implement a feature in my mobile game where if you press on a game object for a certain amount of time while not moving your finger an animation will play. I also need to be able to drag and ...
user avatar
0 votes
1 answer
40 views

Why use Animator.StringToHash?

Using Animator.StringToHash, doing something like: public static readonly int MyBool = Animator.StringToHash("MyBool"); Could anyone explain why one ...
user avatar
  • 21
0 votes
1 answer
21 views

Unity mobile joystick input doesn't react to touch

I created a 3D mobile project, so I used my own joystick script, I also tried joystick from asset store. The problem is that the stick image of joystick doesn't move at all, in this case it's ...
user avatar
  • 3
0 votes
0 answers
14 views

I would like to learn Unity and i need some tips [duplicate]

I have done quite a bit of programming in C#, i would say i have a fairly good understanding of mathematics, but i am not good at graphicsdesign. Do you have any ideas for a project to start with to ...
user avatar
0 votes
1 answer
25 views

Unity asking to enter Safe Mode?

I installed 2021.3.2f1 with the documentation and WebGL module and created a new project from Unity Hub. When I try opening that though I get this: Not sure why this is happening. I deleted the old ...
user avatar
  • 101
0 votes
0 answers
28 views

How does using C# and C++ together with Unity affect efficiency?

I'm new to game dev and I'm looking to use Unity to create a phone game that will utilize neural networking. Obviously, putting neural networks in a mobile game presents a serious performance concern, ...
user avatar
  • 1
1 vote
1 answer
35 views

Centralized Event System with arbitrary number of parameters of arbitrary types

I've coded an event queue system that supports subscribing/firing events with an arbitrary number of parameters of arbitrary types. So I basically declared a delegate that accepts arbitrary parameters ...
user avatar
  • 13
0 votes
1 answer
33 views

How to check if finger is touching the screen using the Unity input system?

I have a While loop that runs when the mouse is pressed and it look like this: while (mouseClick.ReadValue<float>() != 0) { //Do something } This works ...
user avatar
2 votes
2 answers
62 views

Applying upgrades to pickups that do different things

In my game, the player has pickups that they can activate that each do different things. Some examples include: Restore your health Gives you a one time speed boost Give you a bubble that bounces you ...
user avatar
  • 113
1 vote
1 answer
22 views

How to convert ZXY euler rotation to XYZ?

I want to know the values of x, y, z satisfying the following. ...
user avatar
  • 121
0 votes
0 answers
26 views

How to set LineRenderer to single color when selecting AnimationType: None?

The problem is when i'm trying to use the None mode the method IEnumerator SelectAnimation should get only type of IEnumerator and I'm not sure how to use the None mode? When starting with the None ...
user avatar
0 votes
1 answer
30 views

How to change animation coroutine when a variable changes, not every frame?

I want to be able to change the enum animation mode at runtime. This way will start the coroutine every frame in Update, but I want to start the coroutine only if the value of the enum variable has ...
user avatar
0 votes
0 answers
37 views

How to make a class diagram in unity engine?

I'm a newbie and learning unity engine. I want to make a class diagram in unity to control my script efficiently. when I create a C# script look up the class diagram but I don't see that. my question ...
user avatar
0 votes
0 answers
17 views

Unity - Reparenting and resetting child's transform properties offsets it from parent (using Timeline animations)

I am beginning to use Unity's Timeline for the first time. I am creating a simple intro sequence where the Animator Gameobject does a position displacement animation (the movements and rotations are ...
user avatar
0 votes
1 answer
17 views

Best practices for mirroring actions of a humanoid rig?

I'm making an action game in Unity, where the player character can hold an item in either hand, and some objects are held in both. I want the PC to be ambidextrous, so I essentially need to be able to ...
user avatar
1 vote
0 answers
27 views

Saving Tiles in an irregular grid

I have a grid, which the user can expand as he wishes. Since I don't know how big the grid will end up (and many tiles will stay empty) a two dimensional array (...
user avatar
1 vote
1 answer
57 views

Problem with placing isometric tiles above and below each other

In unity when using the in built tale palette to place tiles into the scene, I have come across a small problem. Im using an isometric tile-map and whenever i go to place a block, I end up placing a ...
user avatar
  • 21
0 votes
1 answer
37 views

Preventing other animations from resetting when a new animation starts playing

I'm playing some animations through a C# script. In such script, I'm not using any other methods except GetComponent<Animation>() and ...
user avatar
0 votes
0 answers
42 views

Increase opacity of a floor plane along the path travelled by a cube

I have a plane object (a normal Unity 3D Plane, but it can be a complex floor in the future) and a cube is moving on the plane. Currently, the plane is transparent. I want to make the plane opaque as ...
user avatar
0 votes
0 answers
12 views

Problem rendering stacked quads on mobile - Unity

I have two stacked quads that use the universal render pipeline 2D sprite unlit default material. They use a 2d normal map of a png file containing a star background that give a parallax effect on my ...
user avatar
0 votes
0 answers
27 views

(Unity 2D) Change sprite on button click

So I'm currently trying to make it so the arrows on the sides can switch among the shirts & pants. My idea is that the scene will load with both at index 0 (both shirt and pants slot being empty). ...
user avatar
  • 1
0 votes
0 answers
37 views

Copy a meshes pose to pose another mesh

I am making a VR project in Unity and am working on a modular character customization system. I am relatively new to Unity, so direction on how to approach this aspect of the project would be ...
user avatar
  • 3
1 vote
1 answer
150 views

Using Unity Jobs to encode file to PNG and then save it on Main Thread

I have a following code , and i can not retrive encoded Output from Job. If I Use JOB : The result is not a valid png file. What I get is a 67,2 MB file which can not be opened with any image editor ...
user avatar
0 votes
0 answers
33 views

How can I reduce Unity file size? (for Mobile) [duplicate]

I looked at the file size of a project I completed for mobile platforms in Unity. The file is 1.26 GB, only the Assets file is 44.5 MB, only the library file is 1.21 GB. I want to downsize it by a ...
user avatar
  • 13
0 votes
1 answer
35 views

UnityWebRequest / UnityEngine.WWW — FileNotFoundException when loading class from Json

I'm trying to load a class using JsonUtility to populate a few strings. I navigate to the file using Unity Simple File Browser and load it using the following ...
user avatar
  • 1
-1 votes
2 answers
29 views

How do I check for nulls when called an event from another script?

...
user avatar
0 votes
0 answers
25 views

Unity Input Buffers

I’m working on the framework for my 2.5D fighting game in Unity (it’s gonna be similar to Street Fighter IV) and I’ve got movement down so I want to start adding attacks. Since there’s going to be ...
user avatar
0 votes
0 answers
35 views

Liquid Simulation in Unity

I would like to replicate liquid simulation of the game Jelly Dye Specifically the way the ink spreads when injected I've looked through several assets for liquids in the Unity asset store but couldn'...
user avatar
1 vote
0 answers
42 views

Is Unity EventSystem pixelDragThreshold inconsistent between PC and mobile?

I've noticed that when I change the resolution setting in Unity on Windows/Mac/Linux, pixelDragThreshold still seems to respect the monitor resolution rather than Unity's resolution setting. However, ...
user avatar
0 votes
2 answers
56 views

How to connect rockets to a space capsule?

I am trying to create a space capsule that has four rockets to balance the capsule. The rockets and capsule haveRigidbody2D and ...
user avatar
  • 3
0 votes
1 answer
29 views

Using MaterialPropertyBlock with tiles

I would like to make it so if the cursor enter a tile, it becomes "higlighted" (slightly whitened), like the left tile below. I'm quite new to Unity, and after reading an article from ...
user avatar
  • 1
0 votes
0 answers
42 views

Class component field keeps returning null when it's already assigned a new value

I turned the non-static field to static to make sure this is the only one being used. I only have one GameObject in the scene hierarchy that uses this Class Component. ...
user avatar
0 votes
0 answers
35 views

Automatically determining the mouse sensitivity

I have a 3D game. The player can rotate the character left+right using the mouse, and move the character forward+backward using the keyboard. The problem is how to set the speed in which the mouse ...
user avatar
0 votes
1 answer
64 views

What's the difference between Unity3D rendering pipeline and OpenGL rendering pipeline?

I wanted to write small software renderer that will follow almost the same flow as OpenGL does, but got stuck with understanding of the rendering pipeline. After reading tons of info across the ...
user avatar
0 votes
0 answers
21 views

Sprite is visibile through others

I'm trying to give a card game the look as if you play at a table. The effect I'm aiming for looks like this The camera used is just a perspective angled camera. The card is a mesh with a 0.02 ...
user avatar
  • 2,245

1
2 3 4 5
303