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

How do you make a clone have the same tag as its original?

I would like to know how do I make sure that every time I instantiate that clone has the exact same tag as its original. In my case I make making obstacles for an infinite runner and have named the...

View Article


How do you make things apply to all Clones of an object?

I have grouped them all under an empty game object and I want to make it that each of the objects spawned have a Y position of one. So basically I want each one spawned to always have a y of 1. Also I...

View Article


How do I apply all things to all clone game objects.

I have grouped them all under an empty game object and I want to make it that each of the objects spawned have a Y position of one. So basically I want each one spawned to always have a y of 1. Also I...

View Article

How to fix button clones that aren't working?

I have buttons that are made on startup and given a onclick listener etc, but when you try to click them in game they are completely ignored as if they aren't even there and it just hits the panel...

View Article

shooting ice bolts

I'm making a 2d top-down rpg, and i have a spell. I made a sprite with icebolt image, but im not sure how i can shoot the sprite multiple times, so that there is 2 or more icebolts in the game at a time

View Article


Change instantiated prefab's rigidbody Velocity

I have several prefabs from an object pool being instantiated by a coroutine. I want to change the velocity of the instances to increase after certain points in time. I'm attempting to do this using...

View Article

Prefab script on clones only reference the first clone instantiated

I feel like this is a simple question but I haven't been able to find an answer nor figure it out for myself yet. I have script on a prefab so that when there is a mouse press, the name of the object...

View Article

Is it possible to either Clone or Re-Send a UnityWebRequest?

We've recently started using UnityWebRequests and something that it is lacking is some way to dictate how many retries it should do before failure, and a manual timeout timer. No big deal, we'll just...

View Article


Edit variable in instantiated clone

Hello everyone, I believe my question says it all, but I need to be able to edit several strings/ints the I created in scripts that are attached to the clone. i.e, I have a prefab to clone, the prefab...

View Article


How can i Delete original Keep Clone

Hello there I am making a Game where you enter a Trigger the Floor will spawn in front of you and the original one AKA the Last one will destroy itself but i cant seem to destroy the last GameObject...

View Article

Hello there I have a Instantiate Issue

What i did was was it to where you can Walk as far as you want and the room spawns in front of you with ever direction you decide to go. The Problem is when the Room Spawns I need to to be 1 of 4 rooms...

View Article

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
Browsing all 508 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>