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
2answers
155 views

Mesh made in Blender is correct in Unity3D as a rendered mesh, but “empty” as a collider?

I created a simple stair "block" in Blender, and it's rendered correctly, but when I tick "Generate Colliders" and try to use it in a Mesh Collider, there is nothing. (Ps.: I need the real mesh as a ...
1
vote
1answer
42 views

How can I exclude an object from receiving shadows?

I would like to make it so that a certain object is being excluded from receiving shadows. While it itself should cast shadows onto other objects, it should not receive shadows from other objects. ...
1
vote
0answers
11 views

How do I make Unity use UTF-8 and LF characters for new script files? [duplicate]

By default, when you make a new script in Unity on Windows, it will use UTF-8 with BOM and CRLF. How do I change this to be regular UTF-8 without BOM, and LF (Unix-style)?
0
votes
0answers
30 views

Unity3D : Unload a loaded and inactive scene

I am using the following coroutine to attempt to unload asynchronously a loaded but inactive scene in Unity : ...
2
votes
1answer
57 views

How to set the UVs of a procedurally generated road mesh?

I want to create a road through a c# script in Unity. I created a mesh like this. The "vertetices" first adds the left and then the right points. Then set the UV the same order and value as "...
1
vote
1answer
21 views

Getting center cell of Unity3D's isometric Tilemap, the resulting position offsetted by a distance?

I am new to Unity3d's Tilemap system and found a problem I couldn't figure out at the time of writing this question. What I want to do is to create a bunch of GameObject overlaid in each of the tile's ...
0
votes
2answers
12 views

How to get EditorWindow client rect?

I want to create a simple console-like custom EditorWindow in Unity. There is a bunch of lables (console lines). I'm using GUILayout.Begi/EndScrollView to position all the labels in one column. The ...
0
votes
0answers
39 views

Unity and C# Server - Real time communication

I am developing a Unity realtime mobile with a C# server, but I have several doubts on what I am doing, as it looks more complicated than how it should be. I am using websockets for network ...
0
votes
0answers
15 views

Unity Sprite Atlas artifacts

I want to use the Sprite Atlas in Unity for enhanced rendering performance, but everytime I try to pack sprites into the atlas they appear with severe artifacts. As you can see, there are blocks of ...
0
votes
1answer
36 views

How do I use trigger colliders in Unity?

I am trying to create a "Fruit Ninja" style game in Unity in VR. I have a BoxCollider on my sword set to "Trigger" and I have some "fruit" objects coming towards it. I then have this function: ...
0
votes
2answers
56 views

My GameObject keeps spawning when it shouldn't

I'm trying to instantiate a new gameObject when the current gameObject gets to a select point. The problem comes when the program gets to the second if() statement. It sets the floorsSpawned to 1 and ...
1
vote
1answer
30 views

Framerate Dependant Steering Behaviour

I've been studying steering and flocking behaviors, if not directly from Craig Reynolds work on Steering Behaviors For Autonomous Characters (http://www.red3d.com/cwr/steer/). I understand the basic ...
-1
votes
0answers
21 views

Animation approach recommendations

Being a novice in game dev I can't find a clear answer on how to decide what way to implement an animation is the best for different scenarios for 2D game. With Unity I can implement animations ...
0
votes
0answers
16 views

Getting location / bounds of centered text

I want to show a dialog box where the user should answer a question. It would look like this: The question is aligned horizontally. I don't show the entire question text right away, but it builds up ...
0
votes
1answer
40 views

Physics.CheckSPhere is not working

I try to use Physics.CheckSphere to check if a coordonate is empty. I use three for loop to cycle threw a 2 x Y x 2 chunk. The problem is that it return true if the corner is touching the coordonate ...
0
votes
1answer
28 views

Coroutine constantly updating animator transition

I have a problem for a while now and I am running out of ideas: I have a made a coroutine used to implement animations in the attacks, something like this ...
1
vote
1answer
21 views

How can I play and stop a Visual Effect Graph effect through script?

Can anyone please give an example lines of code one could use to play/stop a VFX through C# script.
0
votes
0answers
35 views

how to create a curve movement of slider in unity

I am trying to create a curved (not circular) movement of slider. Here is my demo images for reference: I have watched some tutorial but those are for circle images. I want to make this movement ...
1
vote
1answer
40 views

Unity Colliders - How do I detect nearby objects without my detection ranges detecting each other

How can I get both colliders' types in a trigger overlap message like OnTriggerExit2D(Collider2D other)? Example: ...
4
votes
1answer
143 views

How to make procedurally generated terrain look realistic

I generated a terrain using a technique from this blog post, everything worked well and I got the wanted result. This is what my generated island looks like: As you can see the terrain have a polygon ...
0
votes
2answers
52 views

Getting notified about a change of a public variable in a script

I have a script attached to a GameObject. In this script I have the variable public int Rotation If this value is changed, I need to do some calculations. I ...
0
votes
0answers
27 views

How to move sprite on z-axis in 2D Unity

I am making a 2D game and I am having trouble in setting up a sprite movement. Here is a picture for reference what I want to achieve: Now car is moving forward (I have done that using road and car ...
0
votes
1answer
104 views

Two Points Rotating Around Circle?

Currently I am working on a 2D game just like duet game, it is my first game (Unity 2D). When I press left key both points rotate fine. But when I press right, the points are not rotated. So my ...
2
votes
0answers
37 views

Unity playing run animation but retaining a t-posed model in the background

I downloaded a character in Mixamo without any animations and then proceeeded to download a separate FBX with animation then without any mesh, so I have 2 FBX files. I then proceeded to add the ...
-1
votes
0answers
33 views

How can I move the character to the center of the screen when the user clicks with the primary mouse button?

I am a newbie at this and I'm just trying to learn how to do different things. I am wanting to move a character sprite in a horizontal line, toward the center of the screen when the primary mouse ...
1
vote
1answer
27 views

How to set keys for emission on/off for a prefab?

I am making a prototype for a Mario game and am having difficulty completing a canned animation for a prefab. There is an item box asset that has 3 materials and an "ItemGet" animation. One of these ...
0
votes
1answer
28 views

Unity WebGL Build: Why it shows only Empty Folder?

i'm trying to built my game, made in Unity 2018.3, and i'm trying to built it in WebGL, but the problem is this: built was succeeded, but the Folder is still Empty, and here is the problem occured: ...
0
votes
1answer
37 views

How can I restart an animation?

The first time the player clicks a button, my animation plays properly. The problem is that when the player presses the button a second time, the animation does not play. Here is the code I'm using ...
0
votes
1answer
48 views

Strange problem with rotation missile | unity3d - c#

I have a vertical missile with launcher that should find closest target and fire it's rocket to hitting target! I use complete code of this 12min tutorial for launching my rocket, and the different ...
0
votes
0answers
23 views

Unity “Convert To Entity” does not work (Render) with “Skinned Mesh Renderer” for Animations

I'm trying to make a game with Unity's ECS and Job System. I came across the issue where, Convert To Entity does not support Skinned Mesh Renderer. It does not render the mesh. I need it for ...
0
votes
0answers
14 views

Unity Animating Function Calls

I would like to use the Animator for calling a function at certain intervals. I have a function that changes sprites of an object and also does a couple of other things, that cannot be simply added ...
0
votes
1answer
14 views

GetMouseButtonUp/TouchPhase.Ended doesn't work properly

I'm trying to make a game where your tap doesn't count until you've released your click, or stop tapping. The weird thing is, it doesn't work in game, but it works for animation. ...
0
votes
0answers
28 views

How can I make plexus effect with VFX Graph?

I need to make plexus effect like this youtube video as you can see there are many points that each point connected to neighbours points
0
votes
0answers
30 views

How can I Morph between two point cache in unity?

I'm trying to morph two shapes in unity what I want is simple transition like this youtube video and this twitter's Gif I made two point cache with houdini how can I make simple transition between ...
0
votes
1answer
9 views

Texture2D GetPixels - Finding pixels that are not transparent. Problem as finding more than expected

I am trying to make a level design system where I use a low resolution png file with certain pixels filled. My code will turn this location of the pixel in the image into placement of platforms in my ...
0
votes
1answer
18 views

Unity3d CarController character positioning issue

I use the unity standard asset components CharacterController and Car and put an empty gameobject onto the car where the camera should be placed when i am inside the car. The empty gameobject is ...
0
votes
1answer
40 views

System.Runtime.Serialization.SerializationException while trying to deserialize List

I'm trying to serialize / deserialize a class that holds inventory items. The code is attached below. First I call AddOne() void a few times, then I call ...
0
votes
1answer
18 views

AudioClip generated by an external process and loaded into the editor has no samples

I'm working on a custom ScriptedImporter -- let's call it LmmsImporter -- that loads project files from the LMMS sequencer as <...
1
vote
0answers
19 views

Modify Unity's New 2D Renderer for the Lighweight Render Pipeline

I would like to use the new 2D renderer available with the LWRP to take advantage of the 2D lights. I would also like to replicate the things in this video - basically, I want my character to be ...
-4
votes
1answer
79 views

How can I execute a C# script even if my game is closed?

I've made a game with Unity and I want to execute a C# script that runs even the game was closed. I searched a lot but didn't find anything.
0
votes
0answers
16 views

How to apply force towards direction using mouse drag and/or touch input direction and input speed?

I've to object. I can move object 1 (my Player) using mouse (or Touch for smartphone version). I want apply a force to object 2 when object 1 hit it. Force direction must be mouse vector direction ...
1
vote
1answer
30 views

unity 3d loading data from json problem

i am trying to practice on loading data from json files my problem is about when i try to load the sprite path from the json file to load the image icon from the floder that contain it, i manged to do ...
2
votes
2answers
122 views

How can I easily create/edit a level for a scrolling shooter game?

I've been asking this question over the years many a time, but I still haven't found an answer when i search for one. Now I have slightly more knowledge of how programming is done and want to start ...
0
votes
1answer
26 views

how to make UI material ignore scene lighting, have same brightness as albedo?

I have a material on a quad surface object that is parented to a canvas for a pause menu. The material is animated (materials on UI elements such as canvases cannot be animated because of [reasons], ...
0
votes
0answers
14 views

Switch scenes and continue to receive bluetooth stream from Update

I have a scene where I'm connected to a BLE device and receive data in bytes. I want to switch scenes from the current Update and continue to receive the data without disconnecting. How should I do ...
0
votes
0answers
26 views

Facilitator UI on desktop screen for VR

Hey and thanks in advance for any help/pointers The solution is probably straight forward but i am still a little inexperienced (while creating quite a few different VR unity projects mostly study ...
1
vote
1answer
37 views

Render order for 3D meshes

I want to highlight a certain item in an inventory. It is a 3D scene although it looks a bit 2D. That is confirmed. To do do that I have create a cube with a very small z scale (so that it looks like ...
0
votes
0answers
31 views

How to make unity recognize the nintendo joycon?

How to make unity recognize the nintendo joycon because it connected and the computer recognizes it but unity does not recognize the joycon
2
votes
1answer
46 views

Making my characters modular

I'm making a school-based sandbox adventure game in Unity. I need a lot of NPCs with different apperances. I dreaded this since I don't have fun doing art and it is usually the reason I end up ...