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

SetParent keeps cloning my gameObject?

I want to assign my object to a new parent and this is working well. But somehow the object ("MySpider") will keep cloning like here in the picture: ![alt text][1] Have been searching for some similar...

View Article


talk to a clone object

hi guys i am wanting to learn how i get a gameobject or transform to talk to the clone object and not by a name but i know there is another way for eg public gameobject bullet; void start()...

View Article


Destroy(clone) not destroying the instantiated prefab

I'm trying to destroy an instantiated prefab but it isn't doing anything. Here's my code: void Update () { if (P1notSpawned) { GameObject player1 = (GameObject)Instantiate(P1, spawnPoint1.position,...

View Article

How to change sprite on a cloned object?

Update 2: I found out that the Animator Controller on the object is "overriding" the sprite. If I disable the animator the correct sprite shows. But then I can't play the animations when they are...

View Article

spawning game objects

I have this script that spawns objects from the center of the game object, I want the script to spawn the objects randomly from the object, rather than only from the center how can i do this?...

View Article


How can edit scene clone?

Hello I have Problem with scene i want to modify button name but i didn't found it in hierarchy because scenes in Dontdestroyonload and it clone. ![alt text][1] when i try edit with play mode i show...

View Article

What should I pay attention to when publishing Clon versions of my game?

Hello there. I want to get the 2nd version of a game I've made. All I have to do is change the assets. I copy the project file for this and open this copy. Is there anything I should be careful or need...

View Article

OnTriggerEnter2D not working on sprite's prefab clones

private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.tag == "Bomb") { SceneManager.LoadScene("Game_Over"); } } Here is the prefab ![alt text][1] [1]:...

View Article


Check if Clone passed a certain position - Score Count

Hello! I'm a total Unity beginner and tried myself on a simple pong game. Here I simply instatiated a clone of a prefab ball when hitting space who moves. If it passes a certain x position (which is...

View Article


2D side scroller/flappy bird clone

I have a Player sprite on screen standing on a ground asset. Both have 2d bc and 2d rigid bodies attached. I want the player to be able to jump (like in flappy bird) but also be able to have a walk...

View Article

Unintentional Occasional Collision

I'm working on a game where you try not to run into obstacles. I have main issue with it however, and that is that some instantiated clones that the player collides with don't activate...

View Article

When I pause the game the clone does not stop

please I need help, I am beginner in coding. when I pause the game the clone still working so I don't know how to fix it. using UnityEngine; using System.Collections; using UnityEngine.UI; using...

View Article

Updating animator for instantiated/cloned object

Hi guys, the cloned object is not playing the "highlighted" animation. The initial object does play the animation, but once it cloned on the scene, the animation is not playing. I try attaching the...

View Article


I need help about Basic Basketball Game

My Codes Works about making Instantiate prefab ball and shooting ball with swipe but Its just works for first ball I froze the ball in Y axis when game start and its opens the freeze...

View Article

how to clone several game objects in a way that clone properties of one can...

How can I clone several unique game objects so that adjusting the components/properties of one clone would affect all other clones of that object in the scene view? Please note that I don't want to...

View Article


Prefab always instanciated at 0

Context: I'm making a 2D rpg and I've got an issue with damage numbers(numbers that should appear where the weapon hits an enemy and then float up and disappear after a few updates). Damage number is a...

View Article

how to break connection between gameobject and its clone in unity.

Hi, i have boxes gameobject and its children. Before i rotate or move this object, i insantiate all of them with using Record() method and if user want to take back action with using Undo() method, all...

View Article


How to make a clone ignore movement input when his parent is moving? HELP!

I use move_states to track character's movement, but it can only track itself, when the character splited into two characters, how to make the clone one ignore the player's input when his parent is...

View Article

Destroy function destroying only one object and not destroying his clones

Hello i'm new to Unity and i'm having trouble with some coding. I'm developing a tower defense idle game. My problem is i need to destroy all my enemies when my tower hp reaches 0. Then i will be...

View Article

Copy a 2D array of GameObjects

How do you make a copy of a 2D array of GameObjects (made from instantiated prefabs) in another script. The array I want to copy is pieces[8,8] in GameManager.cs. I have tried: for (int i = 0; i <...

View Article
Browsing all 508 articles
Browse latest View live


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