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

Spawn enemy at an offset

var player: GameObject; var enemy : Transform; private var timer: float; var seenDistance = 40; var rotationSpeed = 100; var moveSpeed = 5; function Awake() { timer = Time.time + 10; } function Start...

View Article


How would I get my parents rotation?

I have a script, but the parent has a rotation I need. I saw a float thingy that can be like... x = blah blah I just cant find it, and help? and if you need to know, the script Im making is a equip...

View Article


How to make the clones of a zombie continue to clone?

Basically I have a scrip to spawn zombies. I would like them to spawn in waves, but that is another story. My issue lies with the main zombie prfab. Whenever I run the game and I kill that first...

View Article

Is it possible to get a cloned gameObject's parent name?

Hey guys, right now, I can't seem to get my cloned object's parent's name. After instantiating my object, it became a child of another object. So, this code if (transform.parent.name == "DropZone1")...

View Article

C# NetworkInstantiate problems.

I have been working on this for over 10 hours trying to get it right. This is my first time really using Unity3D to this extent. I just started today and I want to keep moving forward because I think...

View Article


Is a clone object still a (clone) if you change the name of it using script?

Is a clone object still a (clone) if you change the name of it using script? I want to create 5 enemies but they all have to have different names. I have one script that will act as the enemies AI....

View Article

Prefab clones with same script and different random number?

I'm instantiating several Prefabs of the same kind. These prefabs should be moving up and down. To make the animation I'm using iTween. void Start () { System.Random random = new System.Random(); int...

View Article

How do I explode multiple clones out of an object?

How do I explode multiple clones out of an object? I have an asteroid which when killed I want to create multiple smaller clones of itself. for (int i = 0; i < 3; i++) { Transform clone =...

View Article


Object reference not set to an instance of an object when targeting a Clone

Hey guys I really have my hands tied here I searched far and wide and can't possibly fathom what's the problem with my scripts. The problem is as easy as this: I have a car racing game, in that game...

View Article


How can i scale down a 2d sprite via script

I'm working on a little game, the mechanics are not important, but when i jump up and hold down S, my player model will split into a total of 5, giving it the illusion that it's broken into more...

View Article

Optimization Help...Sending UDP Data from Clones to Max

HI all, I have the following script (below), which is sending cloned planet prefab position data from Unity into Max via UDP. I am receiving all data fine, as long as I only have 3 or 4 clones. When I...

View Article

How to clone object into array? C#

Hello! How to create array of GameObject?

View Article

I cannot see my cloned prefabs.

Hello!! I'm trying to clone one of my prefabs (capsule named X) when I press down my left button mouse. My capsule is cloned each time I press the button and I know this because I can see X(cloned) in...

View Article


Sprite Sheet(Texture not readable?)

It says texture is not readable although I enabled the "read/write enabled" checkbox. I am trying to instantiate some tiles or cubes on the screen with a part of a photo. All the boxes together would...

View Article

What will be better approach either to clone or create new object Unity4.3

Hi Folks, I am working on 2D game in Unity3D. Game is just like ball popper where ball generate randomly I hope u get idea what I want to build, what I need to ask is that either I want to create clone...

View Article


Instantiate(this.gameObject) causing crash

I'm creating a game similar to asteroids. Currently I have an asteroid with X max health, and upon reaching half of that, it reduces in size, sets max hp to current, then makes a copy of itself. When...

View Article

How to Parent a Cloned Object to Another Cloned Object

So I'm working on a procedurally generated endless runner kind of thing, it's my first real Unity project. I have a plane that slides forward, and then instantiates another plane, then destroys the...

View Article


clone object make a new script

I have an object that I am cloning, when I clone it, they share the one script. Can I clone an object but make it run a new script with but with the same internals? For example, I have a box, I click...

View Article

How can I duplicate an object and place it randomly near the original ?

View Article

Instantiate Object Problem

Hi I'm making a 2d space shooter, very typical controls, WASD to move and mouse to shoot. I began with a set amount of enemies that I placed by hand, but I obviously don't want that, so I'm trying to...

View Article
Browsing all 508 articles
Browse latest View live


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