• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges

Results For: parent at runtim

avatar image

RobAnthem commented

Changing parent at runtime problems

May 21, '17 parenting

1 Reply

0 Votes

? I'm trying to change a GameObject parent during runtime. I can do it, but the problem
avatar image

Answer by Bunny83 · May 20, 2017 at 08:21 AM

That doesn't work. A child always inherits the scale of it's parent objects. When you parent
avatar image KdRWaylander · Apr 29, 2015 at 07:01 AM 1
Can you ckeck its position when the object has a new parent ? Maybe it is still there but moved far away ?
avatar image MagicoCreator · Apr 29, 2015 at 11:51 AM 1
are you parenting it under a gameobject witch has (or any of it's parents) a scale of 0,0,0
avatar image

SuryaPrakashModi answered

Change gameObjects parent at runtime

Jul 8, '18 gameobject·transform·parent·children·child-to-gameobject

3 Replies

0 Votes

Hi all, I have a script which at runtime moves a gameobject from one parent to another (from
avatar image

Answer by Garazbolg · Jul 18, 2017 at 02:11 PM Best Answer

to change the parent of "myobject". Its children will follow. So if i have : -ParentA --myobject
avatar image aca85 · Jul 18, 2017 at 12:04 PM 0
I am not, or at least i think i'm not. The script which is doing this is attached to Parent B
avatar image

vikingnm commented

parent variable nulling out in child...

Jan 22, '15 parent

1 Reply

0 Votes

in the child script. I even have a log in the parent to make sure the variable is set which it is at runtime
avatar image vikingnm · Jan 22, 2015 at 05:12 PM 0
That worked like a charm, thank you. Interesting it sounded like the base/ parent class gets called
avatar image

ScaniX commented

Changing parent at runtime rotates object.

Sep 20, '16 in Help Room

0 Replies

0 Votes

in. Using Triggers parent are set correctly, but since the rotation of some rooms are different my
avatar image ScaniX · Sep 20, 2016 at 01:34 PM 0
I don't understand the problem. That is the expected behaviour. When changing the parent, the local
avatar image

sneftel answered

set parent

Jun 22, '11 parent

1 Reply

3 Votes

How do i change the parent of a gameObject through javascript?
avatar image

Answer by sneftel · Jun 22, 2011 at 07:27 PM Best Answer

Parent-ness is actually a relationship between Transforms, not Gameobjects. So if `a` and `b
avatar image

Dream168 published

Enable / Disable Static Object's Parent At Runtime

Dec 7, '16 culling

0 Replies

0 Votes

Hi, Can I enable / disable a bunch of static object's root parent at runtime during gameplay
avatar image

Dave-Carlile commented

parent specific axis with script

Nov 5, '15 parent

0 Replies

0 Votes

I want to parent only the translate.x of an object. I tried this transform.parent
avatar image

flaviusxvii answered

Parent and childs

Jun 20, '11 parent and child

1 Reply

-1 Votes

of other at runtime... i want that when the user click a GUI button an object become the parent
avatar image

Answer by flaviusxvii · Jun 20, 2011 at 07:37 PM

][1] and how to [ parent an object][2]. Oh wait, I've given it all to you. BTW, the docs
avatar image Chris D · Jun 20, 2011 at 07:37 PM 1
]: http://answers.unity3d.com/search.html?redirect=search%2Fsearch&q= parent+at+ runtime
avatar image

N1warhead asked

Unity5 Alignment with parent (weird)

Mar 4, '15 parent

0 Replies

0 Votes

Hey I'm having Issues with my parent and child alignment, I just can't figure it out for nothing
avatar image

mikelortega converted comment to answer

UI Image Instantiating and setting parent

Dec 29, '15 in Help Room

1 Reply

0 Votes

Hello, i need to instantiate this image, which works, but it doesn't put it under the parent Canvas
avatar image

dsnettleton commented

how to access a scripts parent or calling object

Jul 8, '13 parent

4 Replies

4 Votes

how can I access the scripts parent game object to get access to other scripts attached to the parents?
avatar image MountDoomTeam · Sep 18, 2012 at 01:04 PM 0
this doesnt answer the question because parent of the current game object is different from parent of the current script which is a component.
avatar image MountDoomTeam · Sep 18, 2012 at 01:14 PM 0
he asked how to get the object of the current script component, and you state how to get thescripts in the parent of the current gameObject.
avatar image MountDoomTeam · Sep 18, 2012 at 12:57 PM 0
The title of this question is clear, how to reference to the scripts parent or calling object
avatar image

Seth-Bergman commented

How can I change a parent of an object through script?

Aug 14, '12 parent

2 Replies

0 Votes

I want to change GameObjectX's parent to something else. How can I go about this? Thanks!
avatar image

shadowpuppet asked

rotation of parent squishes player?

Jul 13, '16 in Help Room

0 Replies

0 Votes

horse on a merry-go-round. And I need the player to then be parented to the spawn point so he
avatar image

Fledered answered

Get the child of the parent the root of the scene

Apr 4, '21 parent

1 Reply

0 Votes

Get the child of the parent the root of the scene **Example** I have a tree of elements
avatar image

MRxBIGxSTUFF edited

Find Renderer Attached To Parent Object Runtime

Oct 21, '16 in Help Room

1 Reply

0 Votes

the renderer in at runtime.. The renderer sits on the players mesh in the parent. Here is what i have so
avatar image

Answer by MRxBIGxSTUFF · Oct 21, 2016 at 09:46 PM

to adjust to my needs. i did the following to find the mesh within the parent.. rend = remotePlayer.transform.parent.GetComponentInChildren();
avatar image andzq · Oct 21, 2016 at 06:22 PM 0
rend = transform.parent.GetComponent(); this returns the renderer of the parent
  • 1
  • 2
  • 3
  • 4
  • 5
  • ›
  • »
  • 1
  • 2
  • 3
  • 4
  • 5
  • ›
  • »

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Refine Your Search

    Submit


    Enterprise
    Social Q&A

    Social
    Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

    Footer

    • Purchase
      • Products
      • Subscription
      • Asset Store
      • Unity Gear
      • Resellers
    • Education
      • Students
      • Educators
      • Certification
      • Learn
      • Center of Excellence
    • Download
      • Unity
      • Beta Program
    • Unity Labs
      • Labs
      • Publications
    • Resources
      • Learn platform
      • Community
      • Documentation
      • Unity QA
      • FAQ
      • Services Status
      • Connect
    • About Unity
      • About Us
      • Blog
      • Events
      • Careers
      • Contact
      • Press
      • Partners
      • Affiliates
      • Security
    Copyright © 2020 Unity Technologies
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell My Personal Information
    • Cookies Settings
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Explore
    • Topics
    • Questions
    • Users
    • Badges