Unity2D game objects don't collide
I made two objects and attached a BoxCollider and a RigidBody2D component to each of them. In the code associated with object 1, I have void FixedUpdate(){ GetComponent ().AddForce (new Vector2 (1.0f,...
View Articled3d11 error / i wanna make it RimLightShader
Hi All :-) Please answer me. answer me. I was studied about RimLighting with Unity5. This is error message. Shader error in 'Custom/Rim_light': constructors only defined for numeric base types at line...
View ArticleNatural camera sway
I want to create natural camera sway without animation on my camera to prevent the camera from just being still all the time. I want the sway to be subtle but noticeable and possibly random if that...
View ArticleSetting the alpha of an instantiated Canvas
I'm instantiating a canvas from Resources, which has a Canvas Group. When this is created, I want to immediately set the alpha to 0, and set it to 1 later. I'm having trouble accessing the component...
View ArticleHow to Create Dynamic Multidimensional Array?
I need to create a 3D array that can be resized per-dimension. My first thought was to create a 1D array and "simulate" the 3D array (like `thing[(height*y)+x]` or whatever it is) but I don't believe...
View ArticleIs it better to check before you change variable
instead of updating every frame, is it better to do: if(valueToChange != targetValue) valueToChange = targetValue I am asking this because I wondered if setting a value takes longer than getting and...
View ArticleBCE0023: No appropriate version of 'UnityEngine.Component.SendMessage' for...
var projectile : Rigidbody; var speed = 10; var TheDammage = 50; function Update () { if(Input.GetButtonDown("Fire1")) { clone = Instantiate(projectile, transform. position, transform.rotation);//...
View ArticleWhere did I go wrong In this script? It seems that whenever I left click ,...
Tis in the title. Here is the script: #pragma strict var Combo1 : boolean; var pipe : GameObject; var mainCam : GameObject; var mainCam2 : GameObject; var m9 : GameObject; function Start () {...
View ArticleMeele System problem
for some reason my melee system won't work it's using raycasts and I did everything right where i make a empty gameobject on the main camera on the player but still nothing. please help me asap! Thx...
View ArticleUnity3d. Make object flicker
So I have a question. How can I make my object glow and flicker like this?? http://www.youtube.com/watch?v=R9jY9akdEok&t=4m28s Thanks in advance!!!
View ArticleWaitforseconds causing erratice flickering between active/not active objects
Hi I've written a script which on a Right-Click an Animatior activates and a caption appears. This toggles, so right-click again and the Animation reverses and the caption disappears. The Animation...
View ArticleIs it inefficient to declare functions after you use them?
I've seen this been done many times, and I don't really see any benefit from doing it. I know that it makes it more confusing because you are declaring a function after you use it instead of before;...
View ArticleCan play audiosource but can't stop audiosource
Hello there people. so basically yea I have an Audiosource which is played at the beginning of my game and then at a certain level the music should stop, however even after I have called the...
View ArticleDo you have to declare static properties and methods inside a static class?
Since declaring a class as static will automatically make all of its properties and methods static, do you still need to use the static keyword on properties and methods? For example: public static...
View ArticleEnable/Disable Scripts
Hey guys. I know this question has been asked a billion times, but I can't seem to find the info I need. I'm trying to make a script where when the Player clicks a flashlight, the flashlight activates...
View ArticleWater Drop
Hi I need help with this script. I have water drop particle effect and I want to create zone where they will be displayed on the screen but I tried this script but it work only with collider and when...
View ArticleMaking my look script turn smoothly
I need help with my player look controls script. i have got the movement right but it doesn't feel smooth. also how do i make it so my player when he looks up the camera stops flipping so that he can...
View ArticleOnTriggerEnter does nothing ...?
Dear all, What I do here is instantiating 12 objects in a circle (with a random multiplier). These objects (spheres) have a sphere collider and a box collider(trigger). The idea is that the player...
View ArticleHow to delete new'd arrays?
I have an array I create thusly: var room:roomInfo[,,]; room=new roomInfo[5,5,5]; What's the deleting syntax? Simply doing `delete room;` or `delete room[,,];` doesn't seem to work. After deleting it I...
View ArticleCompare 10 items and rate them (high Score)
Hello every one I have 2 items one of them is "count" and other one is "time". I try to compare time with saved times and rate them in array. this script should compare "Time" and rate & if they...
View Article