Destroy Prefab clone
Hey everyone.. I am having one coin pattern prefab in that i have collection of coin with single parent object.. Now whenever my player collides with that coin i am destroying coin in **player**...
View ArticleUnity Creating Invisible Clone (C#)
Hey Guys I have a enemy script that looks at a variable from the player script. So I have local variables in the enemy script for the player, and various scripts attached to the player. The problem is,...
View ArticleRotate a clone-object 90 degrees on spawn
I need to rotate an object that is cloned by a GameController (spawning of asteroids in a spaceshooter game) As seen in this picture: http://i.imgur.com/biUa8at.png , I have to rotate the asteroid...
View ArticleHow to teleport the player to the location of an instantiated projectile?
I want the player to be able to fire three slow moving projectiles with the right mouse button and then teleport to them, one after the other (as long as they still exist) using the left mouse button....
View ArticleHow to destroy more than one clone at runtime???
for (int i=0;i<5;i++) { Destroy(GameObject.Find("bullet(Clone)")); } I used this code.but it destroy only one clone not 5.
View Articledestroy player cloned weapon (multiplayer
Hi, i have a game setup where a player can instantiate a weapon with rpc and destroy it to swap in a different weapon that with testing i can see through other connected clients but my problem is I...
View ArticleGetting a copy/clone of an object from an array (C#)
I'm currently working on an inventory and item management system that uses a sort of loot table system for all possible items. The loot "table" is quite simple, it's just an array of my InventoryItem...
View ArticleInstantiate Clones Itself - Rather than Prefab
I don't really understand what I'm doing wrong here - might just need a fresh pair of eyes to look for me. I'm building a 'wall building' system for my game - where you place a wall post down (post A),...
View Articlebullets fire (clone) wrong direction *2d
the (clone) bullets fire go to wrong direction and i use this code i am making a 2d game **using UnityEngine; /// Simply moves the current game object public class MoveScript : MonoBehaviour { // 1 -...
View ArticleCode only affects first clone?
Hi Jeremy here! The code below works great but only for the first clone that is instantiated? I need it to work for all the clones and I have never had this problem before and can't seem to quite...
View ArticleMultiple colliders on one object? Or changing variables on a specific clone.
I have this cloned object with 2 colliders. One small one, and one big one. When the big one gets hit, something happens on the parent script, and when the small one gets hit, something different...
View ArticleGetComponent of ALL clones?
How do I get the component of all the clones of my object? When I use `box = GameObject.Find("Box").GetComponents();` It only gets the component of the first box he somewhat finds, but ignores the...
View ArticleHow do you get the component/access the script of the object you hit?
How do you get the component/access the script of the object you hit? For example, when **Object A** hits **Object B**, I want **Object A** to have access to the scripts of **Object B**. Also, **Object...
View ArticleUnity (clone) not destroying
So am i crazy to think that the (clone) objects get destroyed after i uncheck the play button in unity? Okay this is my code to Instantiate maybe I'm doing it wrong ... public Transform...
View ArticleNullReferenceException: Object reference not set to an instance of an object...
I am fairly new to Unity and I am stuck. One of the problem I have is that if there are 2 different scripts, and both have a Start() and Update(), which scripts functions run first? hmmm. And also im...
View Articleclone not visible in game view
var blup : GameObject; function Update () { if(Input.GetMouseButtonDown(0)) { Instantiate(blup, Vector3(Input.mousePosition.x,Input.mousePosition.y,0), Quaternion.identity); } } I made this code (I'm...
View ArticleHow to create a clone of an object with a different name
Hi guys, Im making a list of my gameobjects and im trying to add a number identifier to the end of each new objects name. So the first object created would be "Enemy" the 2nd object would be "Enemy1",...
View ArticleInstantiate and Destroy an object while crossing a line with its clone also
Hello!! I am new to Unity. I just wanted to know that how I will instantiate an object when it cross a line which is made up of cube and it happens again and again means the clone(instantiated object)...
View ArticleCamera and enemies are referencing a non existent clone of playerPrefab
Everything has been working fine up until I added an animator and animations to my player prefab. The thing is that when I added the Idle animation as well as the run animation the main camera as well...
View ArticleDuplicate Object, by dragging? (SporeCreatureCreator Like)
**Ok so this question, it's weird to explain but i will do my best:** I am doing some kind of "Spore Creature Creator", and I have the "Spine" of the creature (Simple cylinders one behind the other),...
View Article