Quantcast
Browsing all 302 articles
Browse latest View live

Parenting object after using new GameObject

Could someone tell me why this does not parent GridParent to Game please? Many thanks in advance. using UnityEngine; using System.Collections; public class Grid : MonoBehaviour { private GameObject...

View Article


When in the script lifecycle are parent-child relationships applied?

So where do the child objects inherit the position of their parents in the order of execution --http://docs.unity3d.com/uploads/Main/monobehaviour_flowchart.svg ;hence where is it best to override this...

View Article


how do I access the topmost parent of an object with multiple parents

I'm trying to access the variables of the topmost parent of a multi-level hierarchy (with multiple "generations" of parents, so to speak) directly without using GameObject.Find() or the like (which...

View Article

Parenting - performance Question

Is it good for performance to have under one objects parented other 100 objects and under them other 1000 objects? So one parent can have 10000+ objects in it. Will it have impact on performance?

View Article

Parenting an instantiated Prefab?

I have a Spawner which I instantiate, and then try to parent withgameObject.transform.parent = Sun.transform; It doesn't complain about the code, but when I start the build it says that "setting the...

View Article


Can 3d objects be children of a canvas?

[Providing an answer to this question based on my own research and experimentation to save others the hassle] Technically yes, but the behavior probably won't be what you are expecting, especially if...

View Article

Parented heirarchy location only?

HI everyone! So, Im making a simple program to display a part design in a robot, that I wanted to be interactive. I wanted a Hinge, where I have a platform and a parented object that flips down in...

View Article

Parenting Object With Triggers?

How can I make an object become a child of another object upon entering a trigger and detach upon exiting? **EDIT : I figured out how to do this and I am going to leave my working script for others to...

View Article


Parenting Problem

Hi all, I'm calling a Draw/SheatSword() function with a event function via Mecanim. It works, but I have the problem that the rotation is wrong when the sword is sheated. The localRotation vaules are...

View Article


Changing parent on collision

Let's say I have 2 cubes, cubeA, cubeB and cubeC. I want to have it so when cubeA or cubeC hits cubeB, the cube's parent is changed to cubeB's parent. I have attempted to do this myself, however the...

View Article

How to Change Parenting while in game? C#

I need to be able to change the parent of an object in a blender character model while in game. For now I have two models, one with it bound to the hand and one where it's bound to the back. I'm trying...

View Article

Parenting rigidbody via script acts differently than via editor?

I have a ship made up of : a) Ship drive central rigidbody with single collider that handles user input and buoyancy/gravity of ship(top level parent/root). b) Hull and barrel cages made from compound...

View Article

Logic Question with position and parenting

Hello, I'm trying to move a child object of a "room" to be on one of the four walls of the room. The problem I'm having seems to be with the fact that the parent, or room, is scaled to fit a specific...

View Article


Strange Relationship Between Armature and Mesh Rendering Game Object

Hello Unity community. The last time I asked this question, I received no answers at all, but since then I've done some investigating and have come up with a couple new useful pieces of information....

View Article

Parenting World Space Particle to a Bone

When I attach a particle that uses world space to one of my character's bones, it has an offset on the Y. If I change the particle to use local space, this offset goes away. Why does parenting to a...

View Article


Dragging Enemies C#

I'm having some trouble coding a script that drags the enemies to different positions (it would follow the player). using UnityEngine; using System.Collections;...

View Article

Physics.Raycast lagging behind

I am making a game where players can be onboard fast moving ships. These ships have controls in the form of panels and I use raycasting to find out which one, if any, the player is currently aiming at....

View Article


Parent Multiple Clones to a New Parent?

I need to parent a series of cloned gameobjects tagged as "monarch" to a single gameobject tagged as "control". The script/s that instantiates them are written in UnityScript and too complicated for my...

View Article

Network.Instantiate parenting on other clients

Hi all, I need help to parenting an object instantiaded via Networking I've an object called SpellGenerator attached to players. When i press a button i would like to cast a spell that play a particle...

View Article

GUITextures and ClickEvent

Hey, I have GameObject which has ***GUITexture Component*** attached onto it. Now this gameobject have GUITexture child. I know how to detect *MouseClick* on a Parent but how to also detect MouseClick...

View Article
Browsing all 302 articles
Browse latest View live


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