Quantcast
Browsing all 168 articles
Browse latest View live

Unity prefab into 3dsmax or another 3d software

Hello everyone :) I'm trying to make endless runner game for android and I'm kinda stuck because my prefabs have too much meshes so it's running slowly. Do anybody here know maybe how to export prefab...

View Article


How to target a gameobject in C# to play animation

I have a script attach to my Character but i want to make the enemy play an animation from that script, so i think i should target the game object (or the enemy) and play its animation on my character...

View Article


Attach a Player to a moving GameObject

[Edited for more precision] Hello ! I've a "playerObject" (that is a prefab, with a rigidbody [gravity set to true]) and when i enter a specific collider (where this script is attached to), i need this...

View Article

Hi, I am new to Unity, and I am having a problem with attaching one object to...

I am following a youtube tutorial by Chimera3D (Part 3 of RPG series), and I am trying to merge 3 objects(coconuts) to another object(tree). For some reason, when I start the game, the coconuts...

View Article

when i attach gameobject i don't move

Hello all, i'm learnig unity from scratch and at [this link][1] you can see waht i make with a lot of effort :) Istructions: 1.with 20click on a tree, the tree will fall 2.with 20click on a falled tree...

View Article


Applying a texture to a sphere

I've been trying to figure out how to apply a texture to a sphere in Unity. Everywhere I look, I get the same answer: "Just drag and drop the texture from the Project pane onto the sphere (in the...

View Article

How to connect tire 3d mesh to the wheel colliders?

I'm trying to create a vehicle with realistic physics. Ok I've been looking at several tutorials about Wheelcolliders. I know they shouldn't be parented to the wheels but instead to empty Game Objects,...

View Article

Adding A Script To A Scene

Hello I recently created the script below. function Update(){ if(Input.touchCount > 1){ Application.LoadLevel("1"); } } My question is how would I attach this to an object or anything to make the...

View Article


Attaching an object to bone dynamically

Here's the code: public var weapon:GameObject; public var weaponBone:Transform; function Start () { // instantiate the weapon prefab var weaponTransform:Transform = Instantiate(weapon,...

View Article


Check Scripts Attached to an Object

Hi, Is there any way to check what scripts were attached to an object previously? I accidentally moved a whole bunch of scripts and now I forgot what scripts were attached to what objects....

View Article

Question about network items

I'm currently getting a notice that the network object im destroying when the item is picked up needs to have a network view, can somebody tell me if that's stable and okey to add network view to every...

View Article

unable to attach a script to a prefab

I have a prefab that I am using with a script attached to it. Here is the code: using UnityEngine; using System.Collections; public class bagDetect : MonoBehaviour { public GameObject okToShoot; public...

View Article

How to attach a button to a gameobject in 2d?

Hi, I have a script which generates random prefabs of gameobjects, is there a way to attach a GUI Button to each of the generated gameobjects, I have been trying but I can't find a way to do it, thanks...

View Article


how to attach rigid object to dynamic surface?

I know there is some time issue when exporting animated object with attach constraint from 3ds max to unity. but I'm looking for a solution to mimic attach constraint in unity inside. is there any...

View Article

OnTriggerEnter() parenting problem.

I've got a Player object and a Weapon object on the scene, and I want the weapon to become attached to `Player` when the player touches the `Weapon`. void OnTriggerEnter2D(Collider2D other) {...

View Article


Attach a cloth to a character

I have added a cloth to one character, but this character works with a capsulle collider, and the cloth deforms due to that collider, I have tried with ignore collision, but it shows an error which...

View Article

C# how to attach a material to a gameobject?

A prefab I made contains a Sphere gameobject. When I look at the prefab in the inspector the material for the sphere is grayed out and I can't drop a texture on it. After I instantiated the prefab in...

View Article


Attach object when NOT in Hierarchy

Hey, I'm new to Unity, which makes me pretty bad at it. I'll try to explain my problem as good as I can. I have an object saved, which I will spawn when a certain thing happens. I want to attach an...

View Article

How to get a parent object after clicking the childObject

Hi guys.I am a novice to unity. I tried to create a 2D top-down game and I came across a few problems; I want to attach a button to a block object, so I stored these two into an object called pairs....

View Article

I need to be able to get an object to attach to another one on mouse hold

My game is a magnet maze, where you attach a magnet from underneath to a cube on top. It just needs to be below it to be able to able. There's an indicator set up to show when a cube is above the...

View Article
Browsing all 168 articles
Browse latest View live