Clone Instantiated from another Clone.
In my attempt to make an RTS game I have created a node system. Each node has a different node number so that way specific units know which one to go to. There is one original node(Goto) and then when...
View ArticleInstantiated Component not Cloning Parent Classes?
When I call `MyComponent c = Instantiate( MyComponent ) as MyComponent;` it does not clone **any** of the values inside of MyComponent's parent classes. To clarify, I have my class order structure set...
View ArticlePrefab clones behaviour
Hello everyone, I don't get how prefab instantiation works. I'm coding a 2d vertical infinite scrolling and I made a script that continually create new tiles of background (prefab) at top and destroy...
View ArticleClone Selector
Hi unityAnswer's Users! I need help about question of clone. I have a script that generates a new clone every time you touch an object. Can I do, with a script, to assign each of these clones a...
View Articleproblem with yield WaitForSeconds()
I want to spawn a prefab after 2 seconds but I am having an issue with my yield function, here is the code: using UnityEngine; using System.Collections; public class spawn : MonoBehaviour { // Prefab...
View ArticleOdd cloning error.
This script is having an odd issue, When I try to clone it, It gives me [Running C#]: ! Assetss/Cloning.cs(11,29): error CS1525: Unexpected symbol 'clone' Here is my code: using UnityEngine; using...
View ArticlePass a copy of a GameObject as variable to another script?
Hello... I'm trying to set up a teleport system that destroys the original object and then spawns a clone of that object at the exit portal. I don't want to just instantiate a prefab, as I want to keep...
View ArticleHow to Clone Array1 into Array2 in Unity? Using JavaScript.
I'm new in Unity, someone can help..? I want to Create a clone from Array1 to Array2. And do what I want in Array2 without affecting the Array1. <---something like this---> var TextArray1 =...
View ArticleWhat is a good way to instantiate new prefabs via script?
I'm working on a prototype for a tree sim game. The tree is made up of multiple pieces and right now, I want a new piece to appear when I click an existing piece. The new piece's scale, location, and...
View Article"Ghost" instance of a prefab
This is brand new to me. An extra instance of my prefab randomly instantiates itself out of the blue at runtime, appearing nowhere in the hierarchy. Yet, Double-clicking it does bring it in focus in...
View ArticleAssign components to Clone objects
I have a Camera object that needs to follow my player (to create a Mini Map). I'm using code from the Photon Viki Demo to spawn players, and it what it does is it creates clones in the Hierarchy ex:...
View Articlehow do you to resolve this unity message
Can“t add component "rigidbody", game object is generatede prefab and only be modified through an assetpostproccesor.
View ArticleCloning objects infront of the player at a random distance
Hello there, First I want to thank everyone who helped me last time :) Now I have one more question, Script is: using UnityEngine; using System.Collections; public class GameController : MonoBehaviour...
View ArticleMinecraft - Water Physics
Hello! I'm making a minecraft clone and I want to create some water too! I made a script that checks whether an object exists next to the water object and if there's no object there, it creates another...
View ArticlePausing animation/movement of a Clone (instantiated enemy)
I'm trying to implement a simple pause button and have been able to pause all animations and motions of my various characters in the game except the clones. I instantiate enemies a few seconds after...
View ArticleHow can I enable/disable a component of a Clone
So I am working on a game which spawns between 0 and 12 clones of a prefab, what I wanted to do at first was to enable the component on a set amount of those clones but I couldn't figure out how to do...
View ArticleHow do I change the transform of a clone object
I'm trying to change the transform of an object I've just instantiated using the following: public GameObject marker; public float maxLength; newVector = Vector2.ClampMagnitude(diffVector, maxLength);...
View ArticleHaving an issue with instantiating objects on button clicks
Theres a button in my scene and I want to instantiate an object when I press it but it returns the error: Type IPointerClickHandler expected Button received. i:0. The variable bullet of helicopter has...
View Articlesend SCORE from OBJECT(clone) to other file
Hi guys. My experience is very small. And my english bad. And Google in 10 hours could not help me. I have 3 script 1. cameraController 2. bg 3. bubbleMove cameraController contains a system of points....
View ArticleReference an Instance of an Object?C#
Hi there! I've got a question about a specific problem related to a topic which seems to be hard to understand. That topic is .GetComponent<>(); The question may sound silly but before I got...
View Article