We’re rewarding the question askers & reputations are being recalculated! Read more.

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
vote
3answers
58 views

Recommended data structure for storage and fast access of infinite chunk-based heightmap terrain

I'm aiming to create a chunk based heightmap terrain in Unity. I already have a basic multifractal simplex noise set up and working, able to generate heightfields and meshes at runtime... but only ...
0
votes
1answer
31 views

unity update boolean from other script

So my problem is that the color of the sprite should only change if the Boolean is true. My theory is that the Boolean isn't being update. So how do I update the Boolean the whole time and see if it ...
2
votes
0answers
55 views

Using shared memory instead of marshalling for C++ native plugins in Unity?

So I'm a C++ developer who has been playing with C# for a week or two in order to get acquainted with Unity, and I'm curious about the marshalling process used to transfer data for use in C++ native ...
0
votes
1answer
27 views

Unity Unique Persistant GameObject ID

I was wondering if GetInstanceID() is persistant at each run? I intend to save/load gameobjects data by their ID....I needed a persistant ID
-1
votes
1answer
31 views

Public MonoBehavior string fields empty

This is bizarre enough that it has to be me being an idiot. I have a MonoBehaviour with some public fields and public methods: ...
1
vote
1answer
57 views

How to use a sprite mask or shader to mask a text?

I'd like to know what I need to learn to apply a shader to achieve masking on the text. Here is my text object in-game, I'm using a sprite mask to mask the game objects on the card, they're all in ...
0
votes
0answers
20 views

Scripting's relations to RAM

So I'm still new to making games that have a baseline for computer resource usage and I'm confused with my question. I can't find an answer anywhere on the internet so I'm here. Simple Question: <...
1
vote
1answer
45 views

Unity, WaitUntil in a self-made message box class

I managed to make a simple message box prefab with a Text and a Button through Canvas, and ...
0
votes
0answers
30 views

Having trouble with getting an image to fit on a face of a cube

I have a problem with a Unity project that I'm working on. I'm creating an 3D art gallery which will be developed into a VR application in the future. In a 3D scene, I have created a ...
1
vote
1answer
44 views

Controlling loop frequency in a Coroutine

I want this coroutine to execute continuously and change the colors. But right now it just waits 1 second at the start and then loops the Coroutine very fast. So my question is how can I loop the ...
0
votes
0answers
16 views

Is there a way to edit a file through an event in game

In my game, players can enter their name. Is there a way I can save player progress so that many different people can play from the start, but players who played before get their progress back?
0
votes
0answers
9 views

Transform.RotateAround with Joystick Rotation

I want to rotate an object around other that matches my current joystick rotation. I know Transform.RotateAround does this but I can't seem to find a way to match ...
0
votes
2answers
23 views

Not able to change Rigidbody 2d gravity scale

I have been trying to change the gravity scale of my Rigidbody2d when I click on it. By default it is by 0 and when I click on it, it should change to 1, so that it ...
-1
votes
1answer
40 views

What goes into a realistic wood material?

Aside from getting a wood texture to use for albedo, what goes into a realistic wood material? For example, in Unity, there are settings such as Metallic and Smoothness, and different shader types ...
0
votes
1answer
24 views

Separate data tables for different item types?

I have two types of items in my game, consumables, and equipment. For my database, should I store them in two different tables, or all in one big items table?
0
votes
0answers
19 views

Delta Pointer Speed Unity New Input System

I'm using Unity's New Input System preview package 1.0.0 in Unity 2019.2.8f1. I have a working player controller script working with an InputActionAsset that uses <...
0
votes
1answer
77 views

Shoot projectile same direction weapon faces

I want to be able to shoot a projectile from a weapon mounted on a vehicle. Right now I am able to do it but only in front of the vehicle. I managed to rotate the weapon to the direction the mouse is ...
0
votes
2answers
51 views

changing color of sprite not every frame

So I have been trying making this game, which changes color of sprites in it. It should only happen when OnMouseDown(). but it is executing every frame and cannot go out of the couroutine. I want the ...
0
votes
1answer
30 views

Calcluate Mesh top, bottom, left and right position relative to mouse click position on the mesh

I have a mesh (suppose it can be circle, or rectangular,square or an arc). The geometry of the mesh can be anything. I can click on mesh at any position. From relative to the clicked position, I want ...
0
votes
1answer
42 views

Controlling a balance wheel using a Unity script

I am working on a small demonstration project with Unity like this (screenshot from footage below). I don't want to use Unity physics, which is too heavy. I plan to create a rotation function with ...
0
votes
2answers
139 views

What information should be stored in a database for a MOBA game?

I'm wondering what information should be stored in a database when developing a MOBA like game? For example: the current item a unit has, how much gold a player has, etc...
1
vote
1answer
38 views

How do I use GetComponent on multiple children?

I'm a beginner and I'm making a game in Unity where I set random colors for four enemies. I made an empty object called "enemies" for me to use it as a folder for the four enemies. I want to get the ...
0
votes
0answers
15 views

How can I enable/disable a script or a method in a script from another editorwindow script?

In the editorwindow script I have a toggle gui : ...
1
vote
0answers
57 views

Control Torque Inputvector

I'm faced with the following problem: I'm trying to implement a rigidbody-based movement for my submarine game which means I want (need?) to useAddForce() and <...
0
votes
1answer
38 views

Unity Bot AI behaviour

I'm working in Unity3d 2019.2.0f1 and I'm trying to make a chasing bot that follows a certain GameObject with the "Player" tag. I'm not yet attempting a field of ...
0
votes
1answer
21 views

How to make a collider the follows all the animations of a prefab?

I have attached a capsule collider with my player(prefab) and made a script so that when Space key is down it does the jump animation in Unity. But because of the collider not jumping with the player, ...
0
votes
1answer
46 views

Unity RTS Multiple Selection Approacah

I've recently solved the single selection problem but now I want to do multiple selections. I know I need to find two points with the mouse position to draw a box but it just won't work for me. ...
0
votes
0answers
20 views

Sprite getting cropped in play window

Video of behaviour: https://youtu.be/yC5m6k3jf2o The worm sprite in my Scene Editor is rendered correctly. When it's in the play window it's getting cropped on the bottom an right though/ I've ...
0
votes
1answer
17 views

'Edit Collider' exits after every adjustment

When I click the Edit Collider button I can see the collider's region and the handles to adjust it. After every adjustment (with the mouse) the collider outline disappears as Edit Collider finishes. ...
1
vote
0answers
49 views

How to vary the initial velocity of a jump based on hold time?

What I want to do is, the longer player holds the screen, the longer distance the object will jump when they release the hold. Here is my code: ...
0
votes
1answer
34 views

Hide “No custom tool available” window

I have this annoying window in the bottom right of the scene view. From the manual, it seems like I opened it by clicking on the wrench & scribe button next to the movement buttons. How do I ...
0
votes
0answers
18 views

How to move an object while the animation is going on?

I added a jump animation with the character in unity and to move the character I have some code like this: ...
0
votes
0answers
17 views

Cross section shader for box bounding using amplify Shader in Unity

I am trying to create shader through amplify shader for a cube to cut through plane or any mesh when cross section. I know that I should be using size, rotation and position for that but what exactly ...
0
votes
1answer
22 views

How to make an animation play when a button is pressed once?

I have added an idle and jump animation to a character in unity. I can make the animation happen when the button is pressed. If the button is up middle at the animation the character goes to the idle ...
6
votes
1answer
57 views

How to “aim ahead of” an object moving in a circle? [duplicate]

Let's say I have a GameObject A that's moving in a circular path in orbit around a central point, and I have a second GameObject ...
0
votes
0answers
14 views

Material becomes undefined when I create a prefab in Unity

I have a parent GameObject and nested models in it. When I create a prefab, I lose contact with the material in some parts of the model. Why is this happening? And how to avoid this? Object Hierarchy:...
0
votes
1answer
28 views

Add single color background to texture using shader

I want to add a single color background to my texture. In my case, in Unity UI, I can simply create two Image components, one on top of another, and use the one on the bottom as a single color ...
0
votes
1answer
23 views

Unity Content Size Fitter to large

I have a content size fitter on the content within the scroll view. However the content size fitter is over double the height needed and when scolling there is a large blank space at the bottom on the ...
0
votes
2answers
67 views

How can I stop this fixed update from executing

so I want this FixedUpdate() Method to stop executing when the Method OnMouseDown() is executed. A bool doesn't work a if() statement also doesn't work Please use my whole code Please help :) Thanks,...
0
votes
1answer
77 views

Load large quantities of data in Unity3D

I'm building an Android app using Unity3D where users can visualize data immersively. The data is immutable and stored using a MySQL database hosted on cPanel. When the user clicks a button in the ...
2
votes
1answer
101 views

Animate a 3D boss with some parts that become independant

I would like to create a boss but first, I want the player to fight the head. Then the head flies to the body and becomes attached to it. Later, the boss will throw an arm to the player and the arm ...
0
votes
1answer
32 views

Spawn Array of GameObjects to Array of Transforms

I have a question regarding spawning an array of GameObjects in Unity. What I want to happen is that when a big enemy dies, it will spawn enemies into their respective Transform positions (i.e., Enemy ...
0
votes
2answers
66 views

When an animation involves movement, where is the movement better to implement?

For context, I am using Blender and Unity. Regarding the question, as an example, in some games, when you get hit, your character tucks a bit and gets knocked back a few distance. The tucking ...
0
votes
2answers
29 views

How come changing the speed of an animation isnt making the animation speed up?

I made an animation of a bow string being pulled and another animation of the string being released but my issue is that I need the string to snap back quickly. I changed the speed of the release ...
-1
votes
1answer
23 views

How to make wheelcollider not stutter when moving on high speed?

I have a wheelcollider attached on a rigidbody and i move the object using : "transform.position += transform.forward * speed * input.getkey(keycode.uparrow)" And when the speed increasing the ...
1
vote
1answer
71 views

Follow 3D Path Around Sphere

I have currently have a path that wraps around a Sphere from one side to another - this is basically a 3D highway in the sky type object that is a textured road. I have an Aircraft model that I can ...
0
votes
2answers
97 views

2D active ragdoll/physics-based procedural animation

I'm trying to make a 2D quadraped robot stand and walk via physics. My robot looks like this. (art is not mine. Source is vapgames) It's rigged via Unity's 2D animation package and each joint/bone ...
0
votes
1answer
29 views

Unity RTS Single Selection Problem

I am trying to build an RTS game and I have managed to form a way to select a unit using Raycast and the tag system. I made it so that if the object the ray falls onto is of tag "TankUnit" Make so and ...
1
vote
1answer
23 views

How to make a changeable color constant for editor materials?

Due to the nature of a project I'm working on, the models I got have a bunch of redundant materials on them. I have to fiddle around with some of the colors, but every time I want to change the colors,...
0
votes
0answers
17 views

Authoritative server running multiple Unity scenes

I want to develop a 2d multiplayer game using an authoritative dedicated server where each session contains up to 4 players and I thought of multiple ways to develop this and I can't decide what's ...