Deep Clone on a Serializable Class?
I am trying to clone the values for an item parsed from JSON. When I go to copy, value by value, and return a new instance of the class, which does not derive from any other class, I see all null...
View ArticleInstantiate(Cloning) gives no errors but just does not work
I'm working on a project in witch I need to Instantiate(clone) houses, I wrote this code: public GameObject House; void start() { Instantiate(House, transform.position, Quaternion.identity); } I...
View ArticleHow can I display Cloned ball velocity in text ?
My cannon is shooting balls whenever FireCannon() function is called by creating a clone of cannonBall. I want to find the velocity of every cloned ball which is being fired & display it as text. I...
View ArticleMaking clones of a GameObject but then the original gets destroyed
So, I'm trying to make a SpaceInvaders-type game, and I made a gameObject, called "Enemy1", which has a script that tells him to follow a specific path; I then made a spawner, that makes (trough...
View ArticleSometimes one sometimes two clone is formed. I just want to form a clone
I have a bool variable that activates with the animation. It shoots arrows depending on whether it is true or false, but sometimes it shoots 1 sometimes 2 arrows. How can I fix this. ![alt text][1]...
View ArticleHow to get the position of a new Instantiated prefab
Hi to everybody!! I have two same enemies already instantiated in the scene from a unique prefab "Dogor (clone)" and I'm instantiating also one bullet to make both to shoot the same bullet, I'm...
View ArticleDelete gameobject clone after a new one spawnes.
I'm trying to instantiate gameobjects on UI menu panel, it works well but whenever i refresh the menu it keeps spawning new clones. I want to delete clone object if a new one spawns, so i can keep only...
View ArticleHow to make camera follow to clone player not first production ?
Hi. I made the code which can follow the clone player. But It worked only the first clone player. If join room second or later, It can't find clone player and doesn't work. How can I fix that ? Thanks...
View ArticleHow can I set parameter of player clone ?
Hi. I made a transfer code, if player clone touched the door, player will transfer to another room. But it doesn't work. I think 'currentMapName' is only set in player object, not clone object. So I...
View ArticleI wanna make gate mechanics. Like Count Masters.
I'll make Count Masters clone. But I could not clone characters when they go through the gate. How can i increase and reduce characters count? Thanks for help,
View ArticleHow do I make it so a clone of an object can't make other clones?
Basically I have a script in which once u click on the original object, it spawns a clone of it, this way there is an infinite amount of the same object, however if i click the clone it makes a clone...
View ArticleHow I make the clone to destroy after a collision?
using System.Collections; using System.Collections.Generic; using UnityEngine; public class GunAK : MonoBehaviour { public float moveForce; public GameObject bullet; public Transform gun; public float...
View ArticleClone/Destroy OnClick(),Clone Create/Destroy OnClick()
Dear All, I hope you enjoy week end outside or with your laptop. It is my first time with Answers Unity after many researchs that helped me doing my first work with C# and Unity. I am on something I...
View Articlehey guys I need help.
I create clone but it doesn't show. it like gameObject.SetActive(false); but it a clone
View ArticleTeleport Object to Mouse Position after Cloning,teleporting an object to...
Hello, I learnt how to clone an object but I don't know how to make it teleport to my mouse position after cloning. What I want to do is clone it, make it teleport to my mouse x and y (I'm making a 2D...
View ArticleHow to create a water wave effect ???,How to create effect pour water like...
I am wanting to create an effect like this game, I followed the instructions and created the movement of the water layers with shaders and materials but I don't know how to create a flow effect like...
View ArticleAdded a destroy script onto my bullets but after the first one they all stop...
So I have made a gun that fires projectiles but they would stay in game, to fix this i added a destroy function to the end of the script. but now once the first clone is destroyed the others spawn in...
View ArticleCannot move the location of a clone object
I have a sphere from which I spawn clones in different placed and with different scaling whenever I hit a button, and I want them to move on Y axis (basically fall down). I am trying to do it by using...
View ArticleScript not attached to clone objects
I am using an object as a prefab in my project and I have attached to it a script that does a movement. I am making some clones of it but none of them has the movement script attached to it. What could...
View ArticleFind Clone with tag
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.AI; [RequireComponent(typeof(UnityEngine.AI.NavMeshAgent))] public class EnemyScript : MonoBehaviour {...
View Article