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
-1
votes
0answers
17 views

How can i make a jump where the character jumps higher the more the button is pressed

Is for a unity rigidbody2d platform game.Thanks!
0
votes
1answer
12 views

How do I create a sphere by script?

I want to add a sphere at runtime via script. I have the following code which compiles fine. At runtime however, no sphere is added to the scene. I have attached the debugger to the script, and I ...
0
votes
0answers
8 views

Moving object along X and Z plane relative to camera

Using keys, I'm trying to move a cursor object across the X and Z plane, keeping it relative to a camera that I can orbit around the playfield. This is my code so far, and apologies...I'm about 2 ...
0
votes
0answers
23 views

Unity's new Input system does not work after building the game

I've made a test project to test the new Input system pointers (touch and mouse), in the editor, everything works perfectly however when I build the game they don't. it's like there is not an input ...
0
votes
1answer
81 views

Could not establish connection with local server process when opening or making Unity project

Whenever i try to either create or open a Unity project, I get faced with this error. Does Unity need a proxy server, because I dont have one. (If so, how do I get one?) And apparently I need to add ...
0
votes
1answer
25 views

what happens when you set transform.position in Unity?

Unity has both transform.positionandtransform.localPosition. When I do ...
0
votes
0answers
14 views

Unity Serialization depth warnings

I've got this class to store spells for my game ...
0
votes
1answer
22 views

Texture with Transparent background has black background in Unity

please see the below image. I made a model in Blender that has eye meshes with UV mapped Pupils. But trying to import all this into Unity is causing tons of weird visual errors... The pupil png has a ...
1
vote
1answer
26 views

How do I restart an animation that is already playing using SetTrigger?

I have set up a relatively simple example scene with one enemy. This enemy is controlled with an animation controller. In this animation controller, I have set up a trigger named "Hit". The enemy ...
0
votes
1answer
15 views

When importing a character to Unity, textures and meshes don't appear

I'm relatively new to Unity, and I'm left with doing this as my last step towards my task - importing my animated character to a game engine and program the movements. The problems that I have ...
0
votes
0answers
15 views

Blender & Unity - Move texture with Bone in way that works with Unity?

I created a character model in Blender with non-spherical eyes. The only way I can make the eye movement look good is if I move the pupil Image Textures along the eye meshes. The way I've achieved ...
0
votes
0answers
24 views

Unity settings overlapping other settings error

In my unity game, I am using the amazing unity asset aura volumetric lighting and when I add its script into my camera this happens: Yeah... I can't see anyone else who got these settings overlapping ...
0
votes
0answers
10 views

How to work with a scene objects in batchmode?

I had an object in first scene, with DontDestroyOnLoad parameter. And when the second scene (void Start ()) loaded, I searched for this object through GameObject.Find(). But this function works only ...
1
vote
1answer
24 views

Open sourcing a Unity game with assets

So, I have a goal to make and publish one (small, stupid, simple) game every ~Saturday. (I've made two, so far, thanks for asking.) I've started in Unity, because it's convenient. My plan for each ...
0
votes
0answers
23 views

Unsure how to change sprites in an animation (Unity)

I'm using Unity 2019.3.13f1 to make a 2D game with friends and I am looking for help with changing sprites so that different characters can look different. Currently we have sprites for hair, heads, ...
0
votes
0answers
20 views

Ability System with Modular Targeting: having trouble finding a good way to map between input components and effect components

I'm trying to make an ability system with modular targeting/inputs for a turn-based RPG game (using Unity) What I mean by that is that most ability systems I've found use an inheritance hierarchy ...
0
votes
1answer
25 views

Angle object only in the X axis

I'm trying to code a turret to angle towards a target, where I have one part of the turret only rotating on the left/right, and I want to animate another part to only angle up/down. I've got the left/...
0
votes
1answer
16 views

Unity: I need to edit my prefab but I can't move anything inside it!

I imported a character into Unity and turned him into a prefab. I couldn't get my custom "Look-At" script to work for the eyes, which are children of the prefab I imported. So I opened the prefab and ...
0
votes
1answer
25 views

collision detection and normals from rigidbody

Until now I've been developing my player character using a Character Controller, but have since decided to switch to rigidbody due to the controller's limitations. In order for my movement code to run ...
0
votes
1answer
37 views

Trying to define a custom Composite to the new Unity Input System but failing somewhere

I'm following the "Touch Samples" sample project that comes with the "input system" package. In one of the sample scene, there is a script that defines a custom composite Binding (for example the 2D ...
1
vote
1answer
35 views

Is an iOS development license with Unity free?

I'm coding in Unity Personal and I'm going to try to put my game onto the App Store (through the Unity --> XCode --> App Store process). In the past, Unity has charged money to get a iOS license for ...
0
votes
1answer
19 views

Animation via AnimatorController created in script does not play in Unity

I have created an empty GameObject and assigned it a script: Main.cs. ...
0
votes
1answer
17 views

How to sample from six cubemap images for a skybox in Shader Graph?

I'm trying to update a skybox shader to URP and reimplement it in Shader Graph. The shader code itself is pretty straightforward, but I don't know enough about Shader Graph yet to set up the basic ...
0
votes
1answer
15 views

Reduce emission of sphere object with HDRP material

I have a material which I have assigned to be used on a sphere game object which acts as stars. This is what the settings are set to: And this is what the Game View looks like: I have also tried ...
0
votes
0answers
12 views

Unity animator causing lights to turn on sluggishly?

I've got lights on a vehicle that I am controlling using several animations. I have an animator with multiple layers and everything works properly. However, I am having an issue where the lights take ...
0
votes
0answers
10 views

For Blender+Unity users— Would Blender's “UV Project Modifier” work in Unity?

So, say in Blender you have a Cube that you put a "UV Project Modifier" on, with an Empty (controlled by a Bone) as the Projector. In Blender when you move the Bone, the UV moves on the cube. Great!​ ...
0
votes
0answers
6 views

Start C# script when imagetarget is detected for Vuforia+Unity

I have a script like given below which implements spirral motion of a sphere to the center (0,0,0). I want the script to start only when the image target is detected, however in my project it starts ...
0
votes
1answer
25 views

Rotating projectile in direction it is moving

I am using a parabola curve to launch my arrows: ...
0
votes
1answer
31 views

Unity toggleable shader property misbehaves when set by code?

I've added a toggle to my shader: [Toggle(ENABLE_COLOR_BLEND)] _EnableColorBlend ("Enable Color Blend", Int) = 0 In the Subshader: ...
0
votes
0answers
7 views

Photon Camera Conflicts

I'm new on this forum as I'm new on unity ^^ I hope I'm not writing this thread in the wrong place. So, I'm trying to get this 3rd person multiplayer Tank with RTC controller game to work, where you ...
0
votes
0answers
16 views

Display/hide image with zoom in/out

After spending a while looking through the forums, I haven't been able to find a thread that deals with transforms on an image. Essentially, what I'm trying to do is display and hide an image at the ...
0
votes
0answers
11 views

Coroutine problem, I don't know what's happening [duplicate]

Calling function. ...
0
votes
0answers
17 views

Unity button tint

unity button tint allows me to give a few colors to different modes of the button: normal, highlighted, pressed, and selected colors. I want to fully disable the "selected" mode color, since whenever ...
0
votes
0answers
11 views

Artifacts on crosshair in game view with FXAA

I have a transparent grid texture that I am displaying on a quad using the URP's built in unlit/Transparent Shader. The intersections render as desired in the scene view, but have artifacting in the ...
0
votes
0answers
13 views

Need to generate seamless gradient noise texture for water Shader [duplicate]

I need to generate something like this for my water Shader, because on fly calculations are to expensive for mobile (https://docs.unity3d.com/Packages/com.unity.shadergraph@6.9/manual/Gradient-Noise-...
0
votes
1answer
31 views

2D player controller moves to the left, but not to the right

I wrote a C# script to control a 2D player, but the script is not fully working. When I press the right arrow/d key to move the player is not moving in the right direction, but I have done the same ...
0
votes
1answer
43 views

Touch goes through UI objects on mobile

I know this question has been asked a lot of times, and I have tried the solutions that were provided and I still have no valuable result, so I thought...maybe a new set of eyes could help. I have a ...
0
votes
0answers
17 views

How to build a hidden 3D snapping grid effect?

Looking to build a 3D grid similar to the image below taken from Google Blocks. Seems like it consists of these main components: A set of spheres that can go transparent. A stencil that follows the ...
0
votes
1answer
15 views

Move an object with other objects connected (via joints) the right way

What is the best way to move an object with other objects connected to it via joints? Let's assume we have the following setup: A player that can move on the x and the z axis "Normally configured" ...
0
votes
0answers
11 views

Can I set multiple animations to run at the same time with Unity's animator (some animated properties would overlap)

I am creating a vehicle in Unity and I am currently trying to set up lights for it. I need to be able to press one button to turn on the parking lights. But the parking lights share the same bulb as ...
0
votes
0answers
24 views

Per-object screen space uv issue

I am currently trying to sample a texture in screen space. This works well : ...
0
votes
1answer
30 views

How to use multiple UV maps with ShaderLab (Unity)

I want to layer one texture over top of another on the same mesh, but map the textures to different UV maps. The example for Detail Maps in the Surface Shader Examples looks almost identical to what ...
0
votes
0answers
29 views

How to speed up script compilation?

Is there a way to speed up script compile time when I change something in VS then click on Unity? It takes 15 seconds. Is this normal?
0
votes
0answers
22 views

Coroutine different behaviour when called from another script

I am quite new with game dev, specially with unity. In order to understand how it works, I decided to start small with a pong game. I have a Ball script, which in the Update() method move the ball ...
0
votes
1answer
22 views

Getting array of points shaping curve from 2 vector3 points

What I want is to get path for DoTween method DoPath(), which as a parameter expects array of vectors shaping the direction of the path. I googled some stuff and found out nothing. Just think bezier ...
0
votes
1answer
83 views

How to pass an argument with ref keyword to a local funtion/ how to work around it?

Unity 2019.3 I am writing a few extension methods to make my life a little bit easier, but this one is bogging me down. I am loading stuff with Unity's Addressable system, and I would like use it by ...
0
votes
0answers
19 views

Have a particle system's particles obey transparency sort mode individually

Background In a top-down game, I have particles that spawn animated textures. I have my 2D renderer settings set-up so that it orders sprites based on their position on th Y-axis via "Transparency ...
0
votes
1answer
58 views

Trying to use an overlapping shader for 2D sprites but sprite wont show its shape

So Im trying to use this shader I had from a while ago to implement shadows in a 2D top down game. In order to show clouds on top of the game. At the moment, Sprites dont overlap which is good, but ...
0
votes
1answer
33 views

How to reset a gameobject to it's prefab condition?

I have a GameObject with a ragdoll in it. Gameobject comes from a prefab which is pooled. So whenever the enemy is killed it's disabled then enabled when spawn. ...
0
votes
2answers
42 views

How can I debug a GameObject's rotation?

I have a model of a dragon, with an animation of it flying. When I play the animation in the Animator's preview, the dragon flies in a straight line, but when I run it in-game, it flies around in ...

1
3 4
5
6 7
250