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

Unity get deleted scene back

I did something clumsy and seem to have deleted a scene and all the game objects in my unity project. I have the whole project under source control and so I think I should be able to get it back, ...
1
vote
1answer
64 views

Why particle effect alway rendered after UI though they have same sorting layer and same sorting order?

Why particle effect alway rendered after UI though they have same sorting layer and same sorting order? I searched a lot of information about it,every one said that both of effect and UI are ...
4
votes
1answer
116 views

Interpolating between positions unfeasible at 30 frames per second?

I am working on a 3D platformer in Unity and I am targeting Android devices. The game consists of a lot of objects smoothly interpolating from the bottom of the screen to the top. This whole time I'...
0
votes
2answers
794 views

How to represent a modular FSM for AI using ECS?

I am considering to implement AI using ECS which actually contradicts working with naive FSMs. My current idea is to have multiple components which represent the particular state an Entity that has a <...
0
votes
2answers
145 views

GPU Gems Chapter 1, update normal

Had plans to follow GPU Gems to gain knowledge in Shaders - but my journey came to an abrupt end. ...
0
votes
1answer
209 views

Unity 5: Downloading Standard Assets won't work

I am watching a tutorial on using Unity 5 to make a simple RPG. I need to download Standard Assets. I download Standard Assets from the Asset Store and it wants me to import it into my project. I'm ...
2
votes
1answer
9k views

How to do offline notifications for Android in Unity3d

I am making a game for Android with Unity3d. I've been looking for a solution to this on the web for a little, but I couldn't find anything suitable: I want to make my game have offline notifications....
0
votes
1answer
23 views

Replicate GetKey & GetKeyDown like a UI button

I'm trying to make a UI Button works like the key presses Unity Input methods, but I can't realize on my own how to make this. I tried using the button event and eventTrigger but it doesn't work like ...
0
votes
1answer
12 views

Sprite is getting out of screen when changing resolution - Unity

Hello I am making this layout: I used sprites for birds but used UI for the blue food thrower. I used UI for it so it will not get cut when screen resolution changes. But I also need to add food ...
7
votes
2answers
216 views

How to have multiple GameObjects sharing pieces of same material?

My question is: There's any way of having GameObjects sharing pieces of same Material, not a clone, but an extension of one? For example, in these case nine game objects sharing just the same material ...
1
vote
1answer
24 views

Updating transform position after root motion

I have an animation of a character climbing with root motion in it (i.e. the character moves generally upwards for a couple of units during the animation). It is intended as a one shot, not a loop. ...
0
votes
0answers
11 views

Shader for blending meshes needs to run on LWRP?

I got this shader from free asset call "Terrain Blending Starter Kit". Unfortunately, It doesn't support LWRP. I tried to fix/add things to make it run but I failed. Could any one help me with this ...
0
votes
0answers
22 views

How box can look like cylinder with circle texture

I have 25x25 cubes at scene. I give it a texture with Tiling- offset settings. But i have problem about cubes at corner. i want it repeat like at top surface so i cant see it like 3D object. But as u ...
0
votes
1answer
27 views

Draco encoder lossless, is it possible?

I'm trying to use the draco library in a Unity project. I've a lot of obj files with models of a person in different positions. When I encode these models with the ...
4
votes
2answers
2k views

Unity XCode build linker error

We are trying to build a Unity game in Xcode but keep getting this error: ld: '/Users/Pero/Documents/GitHub/MyGame/XCodeProject/Pods/GooglePlayGames/gpg-cpp-sdk/ios/gpg.framework/gpg(libgpg.a-...
5
votes
2answers
5k views

Handling movement on sloped surfaces - clamping character to sloped surface

I've noticed that a lot of people seem to have this issue but I've yet to find an actual working solution - when a rigidbody-based character controller (I'm not using Unity's character controller) ...
0
votes
1answer
347 views

Unity - Button still interactable even when interactable is set to false

my button can still be pressed in-game even if I set it to button.interactable = false; What I'm trying to achieve is when the Panel ...
-1
votes
1answer
68 views

How can I make my score Increase Every Level?

I m implementing a simple score system. everything works fine but when I leave the game and then the last score fetch using debugging but score text not updated?? ex: Level1:100 Level2:200 Level3:...
0
votes
0answers
21 views

Importing NSubstitute into Unity project

I'm trying to use NSubstitute in my Unity project. No matter how to import it, my IDE, both Visual Studio and JetBrains Rider, would give an error when I try ...
0
votes
0answers
13 views

Unity is not responding in Ubuntu 18.4

I am running the build Unity executable in ubuntu 18.04 and it may take a while to load the asset. When I wait, I always receive a window telling me "You can choose to wait for a while to let it ...
0
votes
1answer
46 views

Adding a profile to a dialogue box

I am trying to create dialogue boxes that contain the profile picture of the speaking character in them. As such, I want the profile pic to be attached to the object itself. If I understand this right,...
9
votes
1answer
1k views

How to save the Mesh from an Interactive Cloth at runtime in Unity?

At the start of a scene I have GameObject called 'sheet' positioned above a 'ball' GameObject. The sheet has an Interactive Cloth component on it and a Cloth Renderer. The Mesh for the Interactive ...
0
votes
1answer
155 views

No more FallbackHand in SteamVR Player prefab

A few weeks ago when I wanted to test some VR stuff in Unity without an HTC Vive I could add the Player prefab from the SteamVR asset and then fly around while testing the game just like in the editor....
2
votes
1answer
541 views

Unity2D: Scaling and Locking Image to anchor points

I have a script that uses Index to change an objects sprite using OnClick to move through the sprites, like a slideshow. I want the image to scale to the size of my anchor points, because I've notice ...
0
votes
2answers
69 views

Unity animation tool doesn't save changes

I'm trying to create an animation inside Unity using the animator tool, however the record tool isn't recording my changes and I'm struggling to get this to create animations. I have created an ...
0
votes
2answers
60 views

Best way to retrieve const data

My game uses big const data which i need to retrieve it to use data used on each level when its needed data security is important I got two options in my head which one is better? Note the data is ...
1
vote
3answers
145 views

C# class works in Unity, but not in Android build

I am using Unity to program a simple Android game in C#. Right now, all the game does is to randomly load one of 196 flags upon startup (view: https://hastebin.com/suxonayoce.cs or code below). This ...
4
votes
0answers
130 views

How to set the camera projectionmatrix so that it's 4 rays always exactly hit the corners of a defined plane?

I have a camera, and I have a plane. The plane has 4 corner points. I need to find out how to change the projection-matrix of the camera so that the projection-rays of the camera always hit the ...
0
votes
1answer
50 views

Visual Studio Code can't see Unity API?

I followed the official step-by-step "Visual Studio Code and Unity" guide, but it seems I messed up something, because Intellisense doesn't see any Unity related stuff. Like the MonoBehaviour class ...
5
votes
2answers
836 views

Use both AddForceAtPoint and change velocity property?

I'm using Rigidbody2D for some game objects. It seems that when I AddForce() or AddForceAtPoint(), the game objects are mostly ...
1
vote
2answers
126 views

How should I store and load structures for 2d tile based game?

I am working on structure generation for my 2d tile based game. Structures can be anything from houses, castles, dungeons, mazes etc. Structures are pre-defined, meaning I defined the width/height of ...
1
vote
1answer
43 views

Unity animation transition with 0 Exit Time doesn't transition immediately

Question Why doesn't an animation transition with an Exit Time of 0 immediately transition to the next state? Minimal example Using Unity 2018.3, I set up an ...
0
votes
1answer
166 views

Why the canvas position is affected by screen resolution in Unity?

I meet an issue that if I use 1024x768 resolution to run my game, the position(not local position) of the canvas is -1 in z axis. On the other hand, with resolution of 1136x640, the position is -5 in ...
0
votes
3answers
93 views

Adding force to a 3d object in a 2d scene

I have a 3d game object placed in a 2d scene (top-down view) in Unity. I want to add force to the object to move it in the direction it's facing. I attached a RigidBody2D component to it and when I ...
0
votes
1answer
34 views

Multiplayer VR art gallery using different headsets

I'm creating a VR art gallery using Unity3D (like a VR Museum Views with more freedom) and would like to have an environment where 1 or more users can gather together, communicate and move around (...
4
votes
1answer
451 views

Problems with Raycasting Requirements

Im working on a script which kinda works like an Enemy AI. Its kinda like a detection system with requirements that are required to be met. This is a recent question i asked using my code Raycast ...
1
vote
1answer
38 views

Rotating UI element using touch for mobile - Unity 2D

I want to create the above object that will rotate on z-axis following the direction of a finger. Like a dial. I have written the following code and attached it to that element: ...
5
votes
3answers
8k views

Unity: Adjusting the camera so that the scene view and the game view look same

when I make any object I'm able to see that by other side in the game view. And this troubles me in adjusting the objects. So can anyone help me to adjust the main camera in such a way that views of ...
0
votes
1answer
17 views

How to get LineRenderer coordinates?

I am trying to get the coordinates or positions that are generated at the time I draw with linerenderer, but it gives me an error. This may be a rookie mistake and I am not using the Linerenderer's ...
0
votes
1answer
217 views

Managers class losing reference to Game Manager when changing scene in Unity

I've got a singleton set up with a overarching Managers class that has references to each of my other managers classes. I also have a state machine set up that handles changing scenes between the ...
0
votes
1answer
121 views

Acceleration in Unity

I am trying to emulate acceleration and deceleration in Unity. I have written to code to generate a track in Unity and place an object at a specific location on the track based on time. The result ...
0
votes
1answer
17 views

donwload audio and save in cache

I am developing a game in Unity3d 2019, the instructions of the game must be translated into several languages. Right now, they are part of the compilation, but this makes the compilation very large. ...
0
votes
1answer
594 views

CrossPlatformInput Prefabs - Button handler to move?

I am currently trying to put two buttons on my UI that move a character left and right if touched down (Held). I would like to use the cross platform input, and would like the buttons to change the ...
2
votes
1answer
606 views

Authoritative server controlling objects in multiple scenes in Unity3D

I am working on a multiplayer project that involves loading into different scenes and playing some kind of mini-game with any other players that happen to be in the scene at that time. These mini-...
3
votes
4answers
79 views

How can I open source my Unity project when I use third party assets?

I know you are not allowed to open source a Unity project that contains asset store items that are either paid or under the default license. I am just wondering if there's any way to make my git ...
0
votes
2answers
76 views

Animating object, setting isKinematic=false, and then letting physics take over

I'm trying to create a "tree felling" effect, where the tree trunk falls over after being cut down by the player. I've used one prefab which contains my tree stump and tree trunk as children. In its ...
0
votes
0answers
15 views

Rotating cube as child of another gameObject results in it skewing in 2 of 3 axes [duplicate]

I have added a cube and changed its scale and position but not its rotation. I added a second cube as a child of that first cuboid. I was hoping to rotate it but instead it just skews the second ...
0
votes
1answer
24 views

Unity) What should i do if i want to change sprite animation in same action?

My character has Idle-Walk-Jump-Attack state in animator. and it can change its appearance when it gets an item. for example, it can equip sword or armor. and i need to change whole sprite. the sword ...
1
vote
1answer
137 views

I want to test the Animator component of a gameobject using nunit, but I am having issues

I made a Blender 3D model with animations. Then I used the Animator Controller, and attached it to the model. The Animator Controller has a few Boolean parameter variables like ...