Destroying the original object destroys all its clones?
As the question's title would imply, I'm trying to destroy a GameObject without destroying instantiated clones of said GameObject. However, this doesn't seem to work. The clones can be destroyed, no...
View ArticleAccess the renderer of a clones child object
Ok, I'm becoming desperate here after 2 h of googeling and probably making a really dumb mistake. I'm instantiating arrows where the gameobject is the arrow with the model as a child. When something is...
View ArticleDestroy instantiated clone after input.getbutton has been released
I'm having trouble figuring this out i want to destroy the instantiated clone after I've stopped holding down a button. So i can improve performance and not have empty clones laying around in the...
View ArticleClone class variables to another... Copy class not by reference
Hello, so im making this pokemon clone. I created a class pokebon which holds every stat. Then i created a variable called pokebon list[] of type pokebon which holds every single pokebon stats. The...
View ArticleInstantiate loops until unity crashes...
Hey I'm trying to instantiate an object but all it seems to do is keep making clones until unity crashes. I only need 3 clones. What am I doing wrong? void Start () { rotation.x =...
View ArticlePlayer instance clone to load transform from prefab
I use code to generate a clone of the prefab player. I have a "bad guy" on the stage that will follow his transform using navmesh. I made a game object drop on the badguy and I loaded the prefab but...
View ArticleOnMouse Events not firing on a Clone
I have a GameObject that consists of a plane and a nested plane. I am trying to (for now) simply change the color on mousedown. if I drop the prefab on the scene and play, it works fine. But after I...
View ArticleParenting an instantiated Prefab... again
There seem to be a lot of question concerning this and while some of them seem to have working solutions, they do not work in my project no matter what I do. An elevator platform should spawn a prefab...
View ArticleCopying Substances
Hi, I've been searching for a while on this subject, but hadn't much luck How do I make during runtime a copy of a ProceduralMaterial and edit it without influencing the original ?. For some reason the...
View ArticleAssigning gameobject to an instantiated prefab through script?
Hello, I'm creating a network multiplayer car game and i'm blocked by this issue of assigning checkpoint transforms to a cloned car. Let me explain it more so as to make it more clear, I have created...
View ArticleHow to copy the real size of another sphere gameobject
Hi everyone, i cannot work this out... I have many spheres in my game, i have a sphere at my cursor and i want to make this sphere match the same size as another sphere in my game when it collides with...
View ArticleInstantiate without (clone) in JS.
Title says it all. I have came this far, Got no errors but it aint woking. var spawnPoint : Transform; var object1 : GameObject; var object2 : GameObject; var object3 : GameObject; var object4 :...
View ArticleCustom Inspector - break link between duplicate fields?
I created a custom inspector that lets me duplicate an entry in a list. I have two problems. (1) Entry 2 points to entry 1 in memory, so if I make a change to entry 1 the change is also made to entry...
View ArticleDeleting a GameObject
This question seem to get asked a lot, which makes it slightly more embarrassing that I can't get it to work! I am trying to delete an Instantiated prefab that a user selects, I've checked through...
View ArticleObject reference not set to an instance of an object
Hello, I'm pretty new to Unity and Java programming and I've been trying to make a score system. I have a script called ScoreController and it looks like this : private var textScore : GUIText; public...
View ArticleHow can I make a game object follow an instantiated game object?
The main issue I am trying to resolve is that textures are stretching over a sphere a little poorly. I am going to have a plane represent the sphere, turn off the sphere's render and have the plane...
View ArticleInstantiated clones arent behaving the same as the prefab
(video of problem: [link text][1]) I have a prefab that is tagged rotatewithPlayer, when I instantiate the prefab, they are positioned randomly, but are at set heights, and face the camera. Here is my...
View ArticleTriggers with clones not firing
Hi! Learning Unity I made a little asteroid killing game. It starts with one asteroid and at some point, it instantiates a clone of it so there are two in screen. I used this to check collision with...
View ArticleHow to Instantiate and change velocity
I have a coconut which my player throws, where in mid-air it will multiply into 3 coconuts. 1 of which will have less velocity than the original and the other will have more, like this... ![alt...
View ArticleMy player object is getting clone which doesn't show up in inspector
Some of my code finds the player object with GameObject avatar = GameObject.FindGameObjectWithTag( "Player" ); lately this code has been returning a different player object than the one in the scene....
View Article