Value being added more than once
So I've been scratching my head on this for about 2 days. What's suppose to happen is a resource is spawned, you click on it, and it is suppose to add 25 to your resource count, then destroy itself....
View ArticleCrash on LoadLevel (Android Project)
Hi. My game crashes as soon as i hit a button which sends me on to next scene, does anyone know what the problem could be? I've updated to the late version of unity3d and nothing changed. public void...
View ArticleC# Adding to an Array
I have this problem in C# where when I try to add an item to an array, it simply makes the array blank. No error is produced. My code for adding an item: public void AddItem ( string itemName , int qty...
View ArticleCamera View Matrix in Script
I am looking to get a Camera component's "view" matrix in a script. I see that I can get the projection matrix using [Camera.projectionMatrix][1], but I don't see a Camera.viewMatrix property... I want...
View ArticleHow do I add stamina correctly?
I am new-ish to JavaScript, and I was using it to add a stamina feature. I am not COMPLETELY new to JavaScript, as I know a bit about it. Can someone help fix my errors? var crchSpeed: float = 3; //...
View ArticleHow does terrain.SampleHeight() work?
Say I want to randomly place a bunch of instances(let's say stop signs) across my terrain at runtime. My terrain was generated at runtime as well. So I figure something like this would work: Vector3...
View ArticleHow to null children of main camera that is also a child?
var start: Transform; // drag here the start empty object var end: Transform; // drag here the end empty object var duration: float = 1.6; // set duration of movement var isNotDead:boolean=true; var...
View ArticleRunning Unity 'headless' on server - Same license?
I'm working on a game that requires some server side logic using unity, so I'm running unity in 'headless' mode on the server (eg. passing in -nographics command line argument). I'm a bit concerned...
View ArticleUnity slows to a complete stop during game testing
Hello again, I tried muscling through this one the last few times this happened, but seeing as how it continues, I thought I'd come to the community for assistance. Not always, but in three particular...
View ArticleSun Shafts
I have three question: 1. How can i make the Unity's sunshafts stop following the camera? 2. Unity's sunshafts are coming from everywhere, how can i make them come only from one direction? 3. Is it...
View ArticleAI movement in certain range
I have created the code to make a cube move towards a ball. Now I want the cube to move towards the ball when the ball is within a certain distance from the cube, and the cube will not go out of range...
View ArticleA way to easily make class objects with multitude of properties? (JS)
My game is stage based at the moment. So in a stage there will be various GUI elements being displayed, various game objects instantiating that aid the player, and even if the player has control or...
View ArticleParallax Cameras and Projectiles
I'm currently toying with a top-down space shooter type game that uses multiple cameras and layers to achieve a pseudo-parallax effect. For all but the player camera, I am simply moving the cameras to...
View ArticleAdd shader code to dll
What is the proper way to add shader code to a class library? I am building on visual studio 2010, it seems no matter where i put my shader code i get errors. Is there a specific wrapper i need to add...
View Articledie Animation is not playing
Animation for die is not playing just enemy is destroying y ? Given below script is attached to enemy when player shoots and health becomes 0 enemy should play die animation.but its not *function...
View ArticleHow to reduce mesh/model size
I have a character model for police. It has around 10 different animations. For each animation our designer has given different models. I have combined all animations into one model using unity's @...
View ArticleUnity free version + IOS pro??
Can I use Unity free version combined with IOS pro version and still able to publish the game to IOS. Or do I need to purchase Unity Pro first before installing IOS Pro add on on it? My objective is to...
View ArticleGun clipping through walls in third person shooter
I'm currently making a third person shooter, and I have some issues with the gun and arms of my character clipping through walls. I've noticed that in some third person shooter they draw the character...
View ArticleHow to retrieve score from gamecentre?
hello all, i need help i m trying to integrate ios gamecenter ,i m post 5 score in gamecentre but i uanble to retrieve this score from gamecenter, using prime31 .can u help how i retrive score?
View ArticleiOS slow performance only first time
I have a performance issue the first time i play the game. After playing a scene more than 2 times, it starts working great. This performance issue happens when i move my camera. I tried using iTween...
View Article