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

Disable sorting on a transparent queue?

I've actually got a couple possible solutions to my problem, but can't find a way to make any of them work. Basically, here's the situation: I'm making a game with a simple scene primarily composed of...

View Article


It is not possible to invoke an expression of type 'SpriteManager[]'.

I'm trying to code a 2d platformer. I keep getting this error, when I try to change the [] to () it tells me unexpected token. I try with semicolen, and without. I'm not sure what the issue is, so here...

View Article


Animation triggers on all instances of player.

Hi, I've hit a snag in my code. I'm making a multiplayer FPS game and currently working on an animation controller script that is attached to the instantiated player prefab. I havent worked with...

View Article

iTween Camera Bug

Hello again. I have an odd little problem where my camera turns 180 degrees on run-time when I use an animation path. Take a look at the video below. As you can see, the first location for the path is...

View Article

Simple Custom editor using Handles.PositionHandle does nothing. Please help!

Hi all, I am writing a simple custom editor to allow for better positioning of colliders within my game objects. The code is simple: @CustomEditor(ColliderContainer) @CanEditMultipleObjects class...

View Article


Completely stop addForce on rigidbody in C#

Hey, I have tried for some time now to create a script that makes my player not to be pushed by the addForce when i hold down a key. So far I haven't found a good solution on how to do this. What I...

View Article

Wandering enemies

I'm trying to get an enemy to wander in a certain area from it's spawn location which is just an empty game object. Anyone know a basic script I can use for making my enemies randomly wander within a...

View Article

Error with picking up an item...

I have a "for" loop that should give the user an item. I have the inventory scripts set up already, everything in good order. However, I do not know how to add the item to the inventory when the player...

View Article


iTweenPath auto keep on terrain

Hello everyone. I'm using iTweenPath a lot, but I'm having a bit of trouble. Right now, when I set a path, the gameobject is moving in the air. I know I can make it move correctly along the terrain by...

View Article


Checking if Input.inputString is a number

Hello, I would like an if statement that checks if a number has been input. if(Input.inputString!=null) { input += Input.inputString; } Instead of checking if its null is there a (quick) way of...

View Article

Starship power core help needed please.

Hi everyone, I need a little help with a scripting problem. I have been searching for answers on the forums and here but with little luck. What i'm attempting to do is create a Power source system for...

View Article

Shooting Gun Script

Okay so recently I found this code to make my gun shoot but it doesn't work. There are no errors listed and I'm using the Cartoon SMG from the Asset Store. Here is the code://the bullet we are shooting...

View Article

I can't find a way to make my own assets.

I'm sorry to have to ask this noobish question but i'm new to unity. I have been browsing the asset store for space-like 3d models but i can't find any i really like. I want to make my own textures and...

View Article


Find a game object using the value of a variable in the script attached to...

I have grid of instantiated objects, each with a script attached that contains a Vector2 defining the grid position (i.e. x,y). Is it possible to access the game object only by knowing the Vector2 grid...

View Article

Animation wrapmode in mechanim? (hip rotate and stay)

I have a character I am animating and would like to rotate his hips when walking to the side(strafe). The animation should play til the end and stop. In the legacy system I set the hip rotate animation...

View Article


Object drops shadow without accepting light

Hi everyone! Actually I want my object to cast shadows let's say from 1-st light source (Directional Light) affecting, but without accepting it's illumination. For this purpose I'm gonna use 2-nd light...

View Article

Changing Alpha values upon OnMouseOver?

Hi there! I have recently started using Unity and evidently, I am a beginner at this stuff. So here is my story. I have created a Gui Texture and assigned an image to it. What I wanted to do is keep...

View Article


Sticky keys on all Unity apps

I seriously have nowhere else to ask about this: On various games (and some non-game apps as well) I have either WASD or Arrow Keys sticking. What I mean is that, for example, after loading a top-down...

View Article

List.Max Vector3 issue with retrieving whole input

Hello, Just started using System.Linq, and I know it's taking me in the right direction.. just don't quite know how I would go about approaching this... I currently am using the X and Y values of a...

View Article

Looping an AudioClip var...

I have a declared variable(soundvar), an AudioClip, that I need to loop. It is not attached to a audio source. Can I make a variable loop independent of an audio source? I was thinking along the syntax...

View Article
Browsing all 171066 articles
Browse latest View live


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