Quantcast
Channel: Latest Questions on Unity Answers
Browsing all 171066 articles
Browse latest View live
↧

How can I get all array/list values within a given range?

Given a sorted array/list/hashtable/dictionary/sortedlist/etc of values, what would be the best way to derive a selection of all the values between two values? var currentTime = 10; var allTimes =...

View Article


I cant make my Character jump.

I already tried a lot of different ways to do this, and my character never jumps... Heres my script: #pragma strict //Vars var WalkSpeed : int = 7; var Gravity : int = 20; var RotationSpeed : int = 5;...

View Article


C# Error "Operator '&&' cannot be applied to operands of type 'float' and...

Hi! When I try to use the '&&' in C#, it just gives me an error I've never seen before. Error: Operator '&&' cannot be applied to operands of type 'float' and 'bool' Code:...

View Article

Edit child in parent list [Custom Inspector]

As question suggests, I have [Serializable] public class Parent { public float myFloat; } [Serializable] public class Child : Parent { public string childString; } public class MonoClass : MonoBehavior...

View Article

Script that stores gameobject hit by raycast keeps getting a...

I've looked at other threads about storing gameObjects as variables when hit by a ray, and I believe a duplicated the answers correctly, but I can't get this script to work. The idea is to have one box...

View Article


Where to put AdMob mediation adapter files in Unity?

This seems like a relatively fundamental step, but I have searched high and low for the exact location to place the various 3rd party adapter files to get them included correctly in Unity on both...

View Article

Animating a fly through that ends rotating around something

I'm having a lot of trouble animating something that shouldn't be this hard. I have a camera fly through on the level within a circular room. Near the end I just want it to rotate around a specific...

View Article

Mouse Look Won't Re-Enable

I am working on learning Unity and have recently used a paused menu script from here: http://wiki.unity3d.com/index.php?title=PauseMenu I am currently using the javascript version and I have modified...

View Article


Multiple RenderTexture and depth buffer

Is it possible to write to one depthBuffer and multiple colorbuffers using RenderTexture objects? In my project I have two RenderTexture objects assigned to separate camera texture targets. Within...

View Article


cloning bullet object

Hi. Im trying to clone a gameobject that has a rigidbody everytime I press the mouse button for a bullet fire effect. I just dont really know how to tackle this problem, because evertime it clones, I...

View Article

2d collision detection

I am making a platform game and I can't for the life of me figure out how to make my player collide with the ground with unitys new 2d features. The player just falls right through the ground. My...

View Article

How can I fix a terrain hugging character so that it maintains it's original...

I am aware that this question comes up several times, and in fact there is a go-to Answer that is referenced for everyone to look at. However, I've got it implemented, but I have a couple of issues...

View Article

Cannot build with occlusion data

I have a project that keeps hanging on "Postprocessing Player" whenever I have occlusion data on my game scene. View volumes are set up, occlusion (5mb data) is working fine in editor, but Unity just...

View Article


Problem with dynamic camera script ( Super smash bros. )

Inspired by one of the older entries in this forum I wrote a dynamic camera script for a small "Super smash bros."-esque brawler. For some reason that lies beyond my comprehension I, seemingly,...

View Article

2D sprite rotating 90 degree

I have a 2d sprite and i want to rotate it from 0 to 90 degree angle and once it reaches to 90 degrees, i want to rotate it back to 0 degree. How can I do this?

View Article


Resuming Application on Android

Hi everyone ! I'm trying to implement Pausing in Unity by using **OnApplicationPause** function. It seems to work fine when I exit my game (on Android) by pressing home button and then comeback through...

View Article

Maximum value for a vector3?

Hi, I move my objects in my game based on swipe and after calculations, I have a single vector3 that I pass to rigidbody.addForce in order to move my object. Thing is, sometimes the player input is...

View Article


2D Particle System & Rotation?

Hi, I am making a 2D game in which I want a particle system that shoots out of the player in a small cone shape as he/she travels. I am new to particles systems however and I am having three troubles:...

View Article

Custom Inspector ScriptableObject List shows Type Mismatch after CreateInstance.

I've been trying to get a ScriptableObject to contain a list of ScriptableObjects. I created an Asset for my container class called *MyScriptableObjectList* that should hold the *MyScriptableObject*...

View Article

My script is not working. Can I have help fixing it?

So I am making a game for school and the problem is the script does not work like it should. The script is suppose to remove the door that is wrong when the player presses up. To go more in depth the...

View Article
Browsing all 171066 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>