Quantcast
Channel: Questions in topic: "clone"
Browsing all 508 articles
Browse latest View live
↧

Mouse drag cloning Game Objects

So I'm making a mario maker "clone" and I want it to instantiate objects when I hold control and drag. It makes almost infinite tiles. I want it to only make an object if the new position is the same...

View Article


Issue with instantiated text clone

The issue is that the temp.sm and various pieces of code that work with the text piece from unity aren't able to figure out that the text piece is equal to surf monkeys even though the debug.log...

View Article


Script removing rigidbody component, NOT game object

Hi, I'm creating a simple game, and I can't kill cloned object with rigidbody component. Script just deletes rigidbody component. Here's the code: public class ShooterProt : MonoBehaviour { public...

View Article

Trying to Clone 1 of 5 GameObjects in a array

Hello there I am Trying to Randomly Clone 1 of 5 Gameobjects in a Array. with this code all it seems to do is clone all Gameobjects in the array and not just 1 GameObject. #pragma strict var RoomPos :...

View Article

Cannot destroy the SphereCollider on Instantiated Objects

Hey, I currently have made a script which instantiates 20 objects (stars). The issue is that I want to destroy then add a SphereCollider on each other objects but I can't got it to work. My function...

View Article


clonning again and again after sometime

void Update () { curspwntime -= 1 * Time.deltaTime; if (curspwntime <= 0) { instantiatedobj=Instantiate(geek1, new Vector3(-35.86f,6.3f,1.43f), Quaternion.Euler(0,90,0)); curspwntime = spawntime; }...

View Article

How to destroy a gameobject's clone when colliding with the ground?

Ok so in my game I have a spawner that spawns clones of a gameobject (Ball). I want the ball's clone to get destroyed when it impacts the ground. I have tried many times to make this work but I have...

View Article

How to consolidate models into a single Asset?

I want create a script to group a *large* number of model assets by placing them as sub-objects of a single GameObject, then storing that as a single Asset, and removing the large number of individual...

View Article


How do I not deactivate all clone's inputfields?

I attach the below scrip to my instantiated prefab (GameObject + myinputfield (child)). When I try to click on one of the instantiated prefab GameObject, myinputfield is deactivated correctly but this...

View Article


Error CS0029 - Trying to destroy an object and then instantiate it again?

I'm very new to programming and game design, so I appreciate any help thrown my way. In designing a "Pong" style game, I'm trying to destroy the ball object after a player scores, then instantiate it...

View Article

Fitting an instantiated prefab inside a cube?

Hello all: I am using vuforia to instantiate a 3d object once it finds a proper imageTarget (info not completely relevant since the problem is not related to Vuforia). My questions is this: Once I...

View Article

instantiated Gameobject trying to access child of child which is a clone itself.

i am trying to access child of child which is a clone itself. tried every possible way but in vain. ![alt text][1] ![alt text][2] **i have tried i adding code also here i have commented the problem...

View Article

Instantiate changes position

Aloha, Right now i am fighting with a instantiate of an existing button and placing it some pixels above it.. ![alt text][1] So now i am just trying to copy this button via C# code.. public GameObject...

View Article


Prefab from file reference not cloned?

I'm still getting used to the way Unity does thing. So bear with me please. I'm currently writing an RPG/strategy-style card game. The way I have organized my card system is by creating Card objects,...

View Article

Vector3.this help

Hello all, I'm having some difficulties cloning a game object and transforming it in certain co-ords. Here is my code (JS): #pragma strict var prefab : GameObject; var p :...

View Article


Destroy the first instantiated clone after 4 have been instantiated

Hi all, I know it must be a simple, but I can't find the proper solution. How would I destroy the first instantiated clone after 4 have been instantiated? This is my code so far but doen't work (this...

View Article

Why I have a cloned prefab when spawning gameObjects?

I have a room setting, that each player can join on its time. There are avatars in the room. They didn't have authority so I used the NetworkIdentity.Spawn(gameObject); in the start function. Now, when...

View Article


Multiple EdgeCollider2D lags so much on mobile

I am using Two Edge Collider for one bullet, One for detecting hit which wastes one life of player, other one for top of bullet which defeats bullet when player jumps top of it, and it covers top of...

View Article

How clone prefab and change it with not change original

I'm trying to create game with random weapons stats with holding 2 weapons in same time 1 in inventory 1 in use(in developt i use 3 for testing). I use rocket and lazer prefab with same scrypt who hold...

View Article

Cloned objects not appearing in game after Unity 2017.1 upgrade

Hi all, I just upgraded to Unity 2017.1. After upgrading my project, I tried to run it. I have a logic to instantiate 3d "tile" objects. The logic consists of doing GameObject.Find() to find the...

View Article
Browsing all 508 articles
Browse latest View live