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

Player Attack malfunction

I Have scripts that player send message dammage to enemies using raycast hit. but every player hit the enemies the functions didnt work. here the scripts * MeleeScript.js (player script assigned on...

View Article


Error: "ArgumentException: get_deltaTime can only be called from the main...

I'm trying to make a weather system that randomly sets the weather every 15 minutes. To make the delay there are 2 variables, "weatherChangeDelayCurrent" which is the current time remaining of the...

View Article


2D Onmousebutton function

Hi, I'm afraid I'm not as proficient with scripting as of yet and I wanted to just make a virtual pet type of simulation game using the new unity 2d features. I wanted it to be so that when you press +...

View Article

Script not responding to key press immediately.

Hello, so i have this script and it works, it does everything i want it too however i have to slam the F key a bunch to make it work. a single button press does nothing. var inside : boolean = false;...

View Article

Daikon Forge Atlas Problem

I am on version 1.0.12 (was on 1.0.11). I have an atlas that I created. It contains a font and many sprites. Everything was working fine until I just added another sprite. At first I thought it was...

View Article


CG Fragment/vertex shader, using a alpha texture?

Hello, can someone point me to a resource showing how to write using alpha texture to cut out a color? Can't seem to find something like that. Thank you. EDIT : I am wanting to do semitransparent, but...

View Article

C# NullReferenceException Error

I cannot figure out what is wrong with this but Unity keeps giving me a NullReferenceException: Object reference not set to an instance of an object for this on two lines of this. this is the method...

View Article

I need some clarification with constructors

So, I was reading a little bit about constructors and though I have a little experience coding and stuff I still need someone to explain something to me. First off what is the difference between the...

View Article


Can you exclude/not build the Facebook SDK with specific Unity build platforms?

I have a Unity project I'm working on for Android, iOS and Windows Metro. The Unity-Facebook SDK works great for Android and iOS but they haven't added support for Windows Metro yet. That's fine, I...

View Article


How to make a camera "point" at an object.

I need to turn the camera towards an object (or NPC) when the Player collides with a TriggerCollider but the player can apporach the TC from diffrenet angles. My question is : How can I make my camera...

View Article

Brackeys Inventory Equipment Effects...

The Brackeys Inventory available on the Asset Store has a script dedicated for effects on items, such as magic effects. I have an item called Heal Gem, that can be equipped to it's own slot. However, I...

View Article

Is there a way to download a .unitypackage from the asset store without...

This may seem like an odd question at first but it is completely logical let me explain. My computer (the one with Unity 3D on it) is secluded and does not EVER get connected to the internet. There is...

View Article

Unity, 2D AI Error

Hello, The problem i have is that the AI Rotates 3 dimensionally when i need it in to 2. I need it to rotate on the sprites centre point not so that it rotates on its side. Its quite difficult to...

View Article


moving an objects axises

Hey! How would I go about moving the X/Y/Z axises of an object? As in I have a file that specifies Origin Vector ,X Axis Vector ,Y Axis Vector ,Z Axis Vector and I'm wondering how I would place a...

View Article

Cached references set in awake aren't persisting

Hi. I have an interesting bug probably resulting in an over sighted "gotcha". I have a script "A" with some variables Material myMaterial; // private material reference public Renderer myRenderer; //...

View Article


Player with RB + capsule collider can easily penetrate ALL kinds of primitive...

My player has a RB with mass of 1, is NOT moving at extraordinary speeds, has physics set to lowest possible distance for collision detection penalty, has continuous detection, and yet can still almost...

View Article

What's faster to compare, strings or typeof(s) ?

What's faster, comparing 2 strings (pre-saved strings representing the names of the objects for example), or comparing a typeof their objects? In my list, I have doors and normal nodes; Thinking about...

View Article


Weapons Class error and creation queries

I'm having some trouble with my script. I'm getting an error. You are trying to create a MonoBehaviour using the 'new' keyword. This is not allowed. MonoBehaviours can only be added using...

View Article

Sprite on SpriteRenderer not keyframing?

I have a sprite renderer in my scene and using Unity I am trying to create a simple cycle animation from my sprite sheet. To do so I'm simple opening the Animation window, creating a new curve and...

View Article

Camera floating to position

Hello. I was thinking how to make a cool way for players to interact with my terminal/ PC. I want the camera to move infront of the monitor (IngameObj) and then i want to display my GUI stuff so it...

View Article
Browsing all 171066 articles
Browse latest View live


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