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 ArticleFitting 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 Articleinstantiated 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 ArticleInstantiate 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 ArticlePrefab 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 ArticleVector3.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 ArticleDestroy 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 ArticleWhy 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 ArticleMultiple 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 ArticleHow 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 ArticleCloned objects not appearing in game while in play mode
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 ArticleHow 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 ArticleHow 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 Articleshooting 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 Articleteleport to instantiated knife (clone)
Hi! I am new to programming and I'm making my 1st game. I want to teleport my character to a knife that he threw. Please see the details below: 1) I tried transform.position =...
View ArticleHow to reference an array of waypoints to a enemy (clones)?
How do I reference an array of game objects (waypoints - spheres) in a enemy(clone)??? ---------- When i run the program the way points game objects are missing from the inspector of each clone....
View ArticleCannot convert type (class) to the same type (class)
**SUMMARIZING MY MAIN QUESTION: "In my Save/Load script, how the heck can I define and initialize a class called GameSettings, to be exactly like the GameSettings (class) located in my...
View Articlehow to play a clone's (prefab) animation?
hi people of earth. what I am trying to do is have my projectile/ bullet (paint ball) hit the wall play a splat animation and delete. so far it is hitting the wall and being destroyed when I try and...
View ArticleMissing Component in a Clone
How do I add a missing component to a Clone object in Unity? I'm currently using C# for the programming language. MissingComponentException: There is no 'AudioSource' attached to the...
View ArticleI have searched like the whole Internet for this lol (get Value of specific...
Hey, so i'm working on a racing Game in which you Race against AI's. Every car in the game (incl. the players one) has a **carEngine script** attached to it, which *for example* makes the car...
View Article